Rules for Rendering of OSMC:SYMBOLS in OpenAndroMaps
Example of an osmc:symbol: (zoom-appear is 13 for all tags – this may be changed in future)
<node id="9940000000" lat="28.0571062" lon="-14.3277732" version="1" timestamp="" >
<tag k="osmc" v="osmc_yes"/>
<tag k="osmc_nw" v="wmnw_rwn"/>
<tag k="osmc_background" v="wmbg_white"/>
<tag k="osmc_foreground" v="wmfg_yellow_lower"/>
<tag k="name" v="54"/>
<tag k="osmc_textcolor" v="wmtc_black"/>
<tag k="osmc_text_len" v="wmtl_2"/>
Description of the Tags (usage in themes):
- osmc=osmc_yes : this is the major RULE for catching the osmc:symbols in a theme
- osmc_nw= wmnw_iwn|wmnw_nwn|wmnw_rwn|wmnw_lwn : this tag inherits the “network” tag of the underlaying route relation and may be used for different zoom mins. Eg. iwn|nwn at level 13, rwn|lwn at level 15
- osmc_background, osmc_foreground : these tags refer to svg symbols. The resolving rules from relations are the same (strict) as implemented at Waymarked-Trails, the reference for hiking maps:
- name : the text that appears on several waymarks (stored at the :text: portion of osmc:symbol)
- osmc_text_len : lenght oft the :text: portion of osmc:symbol – you will need this for scaling the symbols so that the text fits the symbol (stretch symbol in X-axis) and/or reduce weight and size of text-font (values 1-4 (5 maybe later on))
- osmc_textcolor : textcolor of :text: portion of osmc:symbol
Important Note: rendering a text above a symbol is tricky with mapsforge and not always reliable, it depends on the skills of the theme-composer to overcome this known issue as far as it’s possible.
Here you can download the files with allowed/supported values for these tags:
UpperCase / LowerCase in OSM-Database is non-critical cause I convert all values (not for :text:) to LowerCase internal. However for the use in themes you have to use LowerCase chars!
Some additional notes:
osmc:symbol = color:background:foreground:foreground2:text:textcolor is not used BUT have to be valid = the values HAVE to match values in osmc_color.txt
osmc:foreground = color:background:foreground:foreground2:text:textcolor is not supported (not even as “::”)
If you, as a mapper, want to have your osmc:symbol rendered in OpenAndroMaps follow the rules linked above at Waymarked Trails.
Why NODES and not line-symbols for waymarks:
- Attaching these waymarks to the ways as line-symbols results in a heavy overhead couse the nwn and iwn are rendered at zoom-level 7 this means that all osmc:symbols for these ways – although defined to appear at zoom-level 13 – are pushed from base-zoomlevel 3 to the base-zoomlevel 2 internally, resulting in white tiles on mobile device.
- For line-symbols there is no way to control amount and placement of the symbols. For nodes its possible to define the placement of the symbols (slightly), eg. for way with 100 Nodes you can place 3 or 4 symbols and (maybe) skip ways with only 2-4 nodes completely. This is not implemented yet but the basic design of resolving the symbols is ready for this.
- Actually the osmc:symbols are placed in between the most inner 2 waypoints of a way
What if more than one route is assigned to a way : The waymark for the route with the highest priority is rendered = iwn, nwn, rwn, lwn
More to come….