MapWriter custom tag mapping

48 views
Skip to first unread message

Mario Pavlic

unread,
Apr 24, 2021, 6:05:19 AM4/24/21
to Mapsforge & VTM
I defined a custom tag mapping xml for MapWriter and displaying nodes and simple ways works fine. However, closed ways (ways that have the same starting and ending point) aren't shown on the map. These are some of the tags I added in custom tag mapping xml:
<pois>
<osm-tag key="type" value="STI" zoom-appear="1" />
<osm-tag key="type" value="STV" zoom-appear="1" />
</pois>
<ways>
<osm-tag key="type" value="rope" zoom-appear="1" />
<osm-tag key="type" value="cdRope" zoom-appear="1" force-polygon-line="true" />
</ways>

Nodes with value "STI" and "STV" are displaying correctly as well as Ways with value "rope", but Ways with value "cdRope" (which are closed ways) aren't. I also use external custom defined render theme and the rule that corresponds to the closed way looks like this:
<rule e="way" k="type" v="cdRope" closed="yes">
<line stroke="#000000" scale="none" stroke-width="1" />
</rule>

What am I doing wrong?

Emux

unread,
Apr 24, 2021, 8:21:28 AM4/24/21
to mapsfo...@googlegroups.com
Try to include it and render it as area first.

As we cannot debug everyone's code / map creation / render theme...

It is easier to compare with some official OSM data element that works
and then see how it is declared in the tag-mapping and render theme.


--
Emux

Mario Pavlic

unread,
Apr 24, 2021, 11:14:20 AM4/24/21
to Mapsforge & VTM
The problem was this (in case someone ever runs into something similar):
Nodes that are being referenced by Ways need to always be defined first.
Reply all
Reply to author
Forward
0 new messages