organicmaps / organicmaps

🍃 Organic Maps is a free Android & iOS offline maps app for travelers, tourists, hikers, and cyclists. It uses crowd-sourced OpenStreetMap data and is developed with love by MapsWithMe (MapsMe) founders and our community. No ads, no tracking, no data collection, no crapware. Please donate to support the development!
https://organicmaps.app
Apache License 2.0
8.58k stars 837 forks source link

Add ability to set anchors/offsets for lines and pathtexts #7952

Open pastk opened 2 weeks ago

pastk commented 2 weeks ago

It'll be helpful for many cases, e.g.

Similar for pathtexts, we'd want to render area's name on the inner side of the border.

Basically its enough to have an anchor: left/right attrib. If its present the renderer should offset the line so that it runs exactly to the left/right of the "main" line (if present) or the default centerline. If we add an ability to set both an anchor and an offset value, then it'd be possible to render slightly separated lines or partially overlapping ones, e.g. image Fancy steps? :) (two offset short dashed thick lines) But maybe we don't need this flexibility.

FYI @vng

pastk commented 2 weeks ago

It might be tricky for thicker lines though (e.g. for "fading" borders) The turns might not look good unless specially processed image

pastk commented 2 weeks ago

If we add an ability to set both an anchor and an offset value, then it'd be possible to render slightly separated lines or partially overlapping ones, e.g.

We'll need it to display cycleways over left or right sides of roads.