logo separator

[mkgmap-dev] styles and multipolygons

From helter skelter hskelter at hotmail.com on Wed Jun 21 16:37:29 BST 2023

I am rendering lines that are tagged NATURAL=VALLEY to show the name along a trasparent line on the map, using this style code:
      natural=valley    { name '${name}' }                                          [0x12005 resolution 21]

It works, but gives a problem with multipolygons that use the same tag: I get the name all along the borders of the polygon, while I would want to see it only inside.
Following the style manual (page 11) I am then trying with this code in LINES style file:
      natural=valley & !(is_in(type,multipolygon,on)) { name '${name}' }                        [0x12005 resolution 21]
and this in POLYGON style file:
      natural=valley  { name '${name}' }                                                                    [0x10f09 resolution 21]

It now works for multipolygons: I see the name only inside, and not along the boundaries.
But doesn't work anymore for lines, meaning that I don't get the name anymore.

What am I doing wrong ?
This is one of the areas with multipolygons tagged as valley, if you want to take a look: https://www.openstreetmap.org/#map=14/46.2816/9.6947

Thank you in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20230621/b4a690a5/attachment.html>

More information about the mkgmap-dev mailing list