MarcusWolschon / osmeditor4android

Vespucci is a OpenStreetMap editor for Android

Home Page:http://vespucci.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Render labels for "all" GeoJson objects

simonpoole opened this issue · comments

Currently we only render labels for Point and Multipoint objects.

See #2489

@simonpoole I am trying to work on this issue (as a part of my participation for Gsoc 2024), could you elaborate a bit on which algorithm do you see fit to render the rectangular canvases for labeling a line. The aim as I see is to render the canvas rectangle such as depending on the zoom level and how much the area the whole line entity takes in the Viewbox, more or less of these labels should be shown along the lines. (Just like one renders the name on a way.) Thus I wanted to know what you think will be the best approach here so that i can implement it.

Additionally if you could also point something out relating to the sluggishness while rendering these labels and what to keep an eye out to minimize this latency that would be helpful.

For line labelling you typically would a) determine the length of the label, b) render it on/near segments of the line that are visible and longer than the length of the label, potentially repeating on longer lines. IMHO that is a bit overkill for this use case, so I would suggest just rendering once on the visible portion.

For polygons I would simply use the centroid of the visible part.