-
Hi, I would like to add contour lines to the Bike rendertheme , what attributes should I use for code lines? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 5 replies
-
First the map files must be created with data for contour lines. Then the render themes must contain the rules to render the contour lines. |
Beta Was this translation helpful? Give feedback.
-
Yes I have that, but I do not know how to adapt the code lines of Elevate for example to the rules of vtm. |
Beta Was this translation helpful? Give feedback.
-
Adapting the contour rules of Freizeitkarte theme we can have the following (can change widths, colors, etc). To understand the theme rules please see the render theme documentation for each library: <m e="way" k="contour_ext" zoom-min="12" zoom-max="15">
<m e="way" k="contour_ext" v="elevation_medium|elevation_major">
<line stroke="#aaaaaa" width="0.5"/>
</m>
<m e="way" k="contour_ext" v="elevation_minor">
<line stroke="#aaaaaa" width="0.2"/>
</m>
</m>
<m e="way" k="contour_ext" zoom-min="16">
<m e="way" k="contour_ext" v="elevation_medium|elevation_major">
<line stroke="#aaaaaa" width="0.3"/>
<text k="ele" style="bold" size="9" fill="#777777" stroke="#00f1eee9" stroke-width="1.0"/>
</m>
<m e="way" k="contour_ext" v="elevation_minor">
<line stroke="#aaaaaa" width="0.15"/>
</m>
</m> |
Beta Was this translation helpful? Give feedback.
-
Hello!! Thanks to your recommendations I have managed to add a lot of
information to "my" rendertheme, I managed to add cycling and hiking
routes.
With their corresponding labels, except for hiking
Where did I go wrong? :
<m e="way" k="hknetwork" v="iwn|nwn|rwn|lwn">
<m cat="hikeonly" e="way" k="highway"
v="footway|path|bridleway|cycleway|steps|track|byway|pedestrian|service|residential|living_street|construction|road|ford|unclassified|tertiary|secondary|primary"
zoom-min="13" zoom-max="14">
<pathText repeat-gap="100" k="ref_hike" font-style="normal"
font-size="9" fill="#008131" stroke="#FFFFFF" stroke-width="3"
priority="200"/>
</m>
</m>
<m e="way" k="hknetwork|network" v="iwn|nwn|rwn|lwn">
<m e="way" k="highway"
v="footway|path|bridleway|cycleway|steps|track|byway|pedestrian|service|residential|living_street|construction|road|ford|unclassified|tertiary|secondary|primary"
zoom-min="15">
<m e="way" k="*" v="*" zoom-max="17">
<pathText repeat-gap="150" repeat-start="10" k="ref_hike"
font-style="normal" font-size="10" fill="#008131" stroke="#FFFFFF"
stroke-width="3" dy="1.7" priority="200"/>
</m>
<m e="way" k="*" v="*" zoom-min="18">
<pathText repeat-gap="200" repeat-start="20" k="ref_hike"
font-style="bold" font-size="13" fill="#008131" stroke="#FFFFFF"
stroke-width="3" dy="1.3" priority="200"/>
</m>
</m>
</m>
Best regards!!
El mar., 10 oct. 2023 11:58, Emux ***@***.***> escribió:
… Adapting the contour rules of Freizeitkarte theme we can have the
following (can change widths, colors, etc).
Note: OpenAndroMaps use k="ele" and Freizeitkarte use k="name" in labels.
To understand the theme rules please see the render theme documentation
for each library:
- VTM
<https://github.com/mapsforge/vtm/blob/master/docs/Rendertheme.md>
- Mapsforge
<https://github.com/mapsforge/mapsforge/blob/master/docs/Rendertheme.md>
<m e="way" k="contour_ext" zoom-min="12" zoom-max="15">
<m e="way" k="contour_ext" v="elevation_medium|elevation_major">
<line stroke="#aaaaaa" width="0.5"/>
</m>
<m e="way" k="contour_ext" v="elevation_minor">
<line stroke="#aaaaaa" width="0.2"/>
</m>
</m>
<m e="way" k="contour_ext" zoom-min="16">
<m e="way" k="contour_ext" v="elevation_medium|elevation_major">
<line stroke="#aaaaaa" width="0.3"/>
<text k="ele" style="bold" size="9" fill="#777777" stroke="#00f1eee9" stroke-width="1.0"/>
</m>
<m e="way" k="contour_ext" v="elevation_minor">
<line stroke="#aaaaaa" width="0.15"/>
</m>
</m>
[image: Cruiser]
<https://user-images.githubusercontent.com/3484020/273856238-89f1e4be-aba2-4a5d-8d4c-a1bd9858ed75.png>
—
Reply to this email directly, view it on GitHub
<#1072 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXGTPYHTUBH7BMI2S6V5T6TX6UL6HAVCNFSM6AAAAAA5Z6Z4OKVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TEMZZGI4TM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Sorry again, I checked the above but I don't see my mistake, I have relied
on the lines of code from voluntary v5, but I only manage to see the names
of the cycling. Hiking and mtb routes are not shown. I use the rendertheme
about mapsforge from Openandromaps latest version in Oruxmaps GP.
The code is as follows:
<!-- legend for Hiking routes -->
<m e="way" k="hknetwork" v="iwn|nwn|rwn|lwn">
<m cat="hikeonly" e="way" k="highway"
v="footway|path|bridleway|cycleway|steps|track|byway|pedestrian|service|residential|living_street|construction|road|ford|unclassified|tertiary|secondary|primary"
zoom-min="13" zoom-max="14">
<pathText repeat-gap="100" k="ref_hike" font-style="bold"
font-size="11.25" fill="#F10F5C" stroke="#FFFFFF" stroke-width="3"
priority="300"/>
</m>
</m>
<m e="way" k="hknetwork|network" v="iwn|nwn|rwn|lwn">
<m e="way" k="highway"
v="footway|path|bridleway|cycleway|steps|track|byway|pedestrian|service|residential|living_street|construction|road|ford|unclassified|tertiary|secondary|primary"
zoom-min="15">
<m e="way" k="*" v="*" zoom-max="17">
<pathText repeat-gap="150" repeat-start="10" k="ref_hike"
font-style="bold" font-size="13" fill="#F10F5C" stroke="#FFFFFF"
stroke-width="3" dy="1.7" priority="200"/>
</m>
<m e="way" k="*" v="*" zoom-min="18">
<pathText repeat-gap="200" repeat-start="20" k="ref_hike"
font-style="bold" font-size="16" fill="#F10F5C" stroke="#FFFFFF"
stroke-width="3" dy="1.3" priority="200"/>
</m>
</m>
</m>
<!-- Legends for MTB routes -->
<m e="way" k="network|mtbnetwork|route" v="mtb|imn|nmn|rmn|lmn">
<m cat="bikeonly" e="way" k="highway"
v="footway|path|bridleway|cycleway|steps|track|byway|pedestrian|service|residential|living_street|construction|road|ford|unclassified|tertiary|secondary|primary"
zoom-min="13" zoom-max="14">
<pathText repeat-gap="200" k="ref_mtb" font-style="bold"
font-size="11.25" fill="#ED6DF3" stroke="#FFFFFF" stroke-width="3"
priority="200"/>
<pathText repeat-gap="100" k="ref_mtb" font-style="bold"
font-size="11.25" fill="#ED6DF3" stroke="#FFFFFF" stroke-width="3"
priority="180"/>
</m>
<m e="way" k="highway"
v="footway|path|bridleway|cycleway|steps|track|byway|pedestrian|service|residential|living_street|construction|road|ford|unclassified|tertiary|secondary|primary"
zoom-min="15">
<m cat="nobike" e="way" k="*" v="*" zoom-max="17">
<pathText repeat-gap="300" repeat-start="10" k="ref_mtb"
font-style="bold" font-size="13" fill="#ED6DF3" stroke="#FFFFFF"
stroke-width="3" dy="-1.7" priority="200"/>
<pathText repeat-gap="150" repeat-start="10" k="ref_mtb"
font-style="bold" font-size="13" fill="#ED6DF3" stroke="#FFFFFF"
stroke-width="3" dy="-1.7" priority="180"/>
</m>
<m cat="bikeonly" e="way" k="*" v="*" zoom-max="17">
<pathText repeat-gap="300" repeat-start="10" k="ref_mtb"
font-style="bold" font-size="15" fill="#ED6DF3" stroke="#FFFFFF"
stroke-width="3" dy="1.7" priority="200"/>
<pathText repeat-gap="150" repeat-start="10" k="ref_mtb"
font-style="bold" font-size="15" fill="#ED6DF3" stroke="#FFFFFF"
stroke-width="3" dy="1.7" priority="180"/>
</m>
<m cat="nobike" e="way" k="*" v="*" zoom-min="18">
<pathText repeat-gap="400" repeat-start="20" k="ref_mtb"
font-style="bold" font-size="16" fill="#ED6DF3" stroke="#FFFFFF"
stroke-width="3" dy="-1.3" priority="200"/>
<pathText repeat-gap="200" repeat-start="20" k="ref_mtb"
font-style="bold" font-size="16" fill="#ED6DF3" stroke="#FFFFFF"
stroke-width="3" dy="-1.3" priority="180"/>
</m>
<m cat="bikeonly" e="way" k="*" v="*" zoom-min="18">
<pathText repeat-gap="400" repeat-start="20" k="ref_mtb"
font-style="bold" font-size="16" fill="#ED6DF3" stroke="#FFFFFF"
stroke-width="3" dy="1.3" priority="200"/>
<pathText repeat-gap="200" repeat-start="20" k="ref_mtb"
font-style="bold" font-size="16" fill="#ED6DF3" stroke="#FFFFFF"
stroke-width="3" dy="1.3" priority="180"/>
</m>
</m>
</m>
<!-- highway labels -->
<m e="way" k="highway"
v="footway|path|bridleway|cycleway|steps|track|byway|pedestrian|service|residential|living_street|construction|road|ford|unclassified|tertiary|secondary|primary"
zoom-min="13" zoom-max="14">
<m cat="bikeonly" e="way" k="cycle_highway" v="ich|nch|rch|lch">
<pathText repeat-gap="200" k="ref_chw" font-style="bold"
font-size="11.25" fill="#0199aa" stroke="#ffffff" stroke-width="3"
priority="210"/>
<pathText repeat-gap="100" k="ref_chw" font-style="bold"
font-size="11.25" fill="#0199aa" stroke="#ffffff" stroke-width="3"
priority="170"/>
</m>
</m>
<m e="way" k="highway"
v="footway|path|bridleway|cycleway|steps|track|byway|pedestrian|service|residential|living_street|construction|road|ford|unclassified|tertiary|secondary|primary"
zoom-min="15">
<m e="way" k="cycle_highway" v="ich|nch|rch|lch" zoom-max="17">
<pathText repeat-gap="300" k="ref_chw" font-style="bold" font-size="13"
fill="#0199aa" stroke="#ffffff" stroke-width="3" dy="1.7" priority="210"/>
<pathText repeat-gap="150" k="ref_chw" font-style="bold" font-size="13"
fill="#0199aa" stroke="#ffffff" stroke-width="3" dy="1.7" priority="170"/>
</m>
<m e="way" k="cycle_highway" v="ich|nch|rch|lch" zoom-min="18">
<pathText repeat-gap="400" repeat-start="20" k="ref_chw"
font-style="bold" font-size="16" fill="#0199aa" stroke="#ffffff"
stroke-width="3" dy="1.5" priority="210"/>
<pathText repeat-gap="200" repeat-start="20" k="ref_chw"
font-style="bold" font-size="16" fill="#0199aa" stroke="#ffffff"
stroke-width="3" dy="1.5" priority="170"/>
</m>
</m>
<!-- legend for cycling routes-->
<m e="way" k="highway"
v="footway|path|bridleway|cycleway|steps|track|byway|pedestrian|service|residential|living_street|construction|road|ford|unclassified|tertiary|secondary|primary"
zoom-min="12" zoom-max="14">
<m cat="bikeonly" e="way" k="network" v="icn|ncn">
<pathText repeat-gap="100" k="ref_cycle" font-style="bold"
font-size="11.25" fill="#ffffff" stroke="#58D5F9" stroke-width="2"/>
</m>
<m cat="bikeonly" e="way" k="network" v="rcn|lcn|ocn" zoom-min="13">
<pathText repeat-gap="100" k="ref_cycle" font-style="bold"
font-size="11.25" fill="#58D5F9" stroke="#FFFFFF" stroke-width="3"/>
</m>
</m>
<m e="way" k="highway"
v="footway|path|bridleway|cycleway|steps|track|byway|pedestrian|service|residential|living_street|construction|road|ford|unclassified|tertiary|secondary|primary"
zoom-min="15">
<m e="way" k="network" v="icn|ncn" zoom-max="17">
<pathText repeat-gap="150" repeat-start="10" k="ref_cycle"
font-style="bold" font-size="13" fill="#ffffff" stroke="#58D5F9"
stroke-width="2" dy="-1.7" priority="200"/>
</m>
<m e="way" k="network" v="rcn|lcn|ocn" zoom-max="17">
<pathText repeat-gap="150" repeat-start="10" k="ref_cycle"
font-style="bold" font-size="13" fill="#58D5F9" stroke="#FFFFFF"
stroke-width="3" dy="-1.7" priority="200"/>
</m>
<m e="way" k="network" v="icn|ncn" zoom-min="18">
<pathText repeat-gap="200" repeat-start="20" k="ref_cycle"
font-style="bold" font-size="16" fill="#ffffff" stroke="#58D5F9"
stroke-width="2" dy="-1.3" priority="200"/>
</m>
<m e="way" k="network" v="rcn|lcn|ocn" zoom-min="18">
<pathText repeat-gap="200" repeat-start="20" k="ref_cycle"
font-style="bold" font-size="16" fill="#58D5F9" stroke="#FFFFFF"
stroke-width="3" dy="-1.3" priority="200"/>
</m>
</m>
Sorry for the inconvenience
El lun., 16 oct. 2023 15:01, Emux ***@***.***> escribió:
… See above
<#1072 (comment)>
how to declare line labels.
The available rules for each map library are mentioned in their xml
schemas:
- VTM
<https://github.com/mapsforge/vtm/blob/master/resources/rendertheme.xsd>
- Mapsforge
<https://github.com/mapsforge/mapsforge/blob/master/resources/renderTheme.xsd>
—
Reply to this email directly, view it on GitHub
<#1072 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXGTPYEQUNLDZGY6LYW2FFTX7UVZ5AVCNFSM6AAAAAA5Z6Z4OKVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TEOJSGUZTA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
![Leyendas_Rutas](https://github.com/mapsforge/vtm/assets/97335264/a41f0014-5ed5-4f4c-b9e3-49c2916997b4)
Thanks for your patience, it seems that it was not a problem of tags, but
of the rendertheme, using the rendertheme by default the code works and the
legends of the hiking and cycling trails are visible.
A pleasure, I will continue to learn.
🅃🅁🄾🄽🄿🄾
El vie., 20 oct. 2023 8:28, Emux ***@***.***> escribió:
… There are wrong tags, the "pathText" is a Mapsforge tag, not VTM.
Please see the VTM themes
<https://github.com/mapsforge/vtm/tree/master/vtm-themes/resources/assets/vtm>
and documentation
<https://github.com/mapsforge/vtm/blob/master/docs/Rendertheme.md> /
schema
<https://github.com/mapsforge/vtm/blob/master/resources/rendertheme.xsd>
about the proper syntax.
—
Reply to this email directly, view it on GitHub
<#1072 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXGTPYE2F4ZZ3S7YKM5OI4DYAIK2HAVCNFSM6AAAAAA5Z6Z4OKVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TGMZVGMZDQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Adapting the contour rules of Freizeitkarte theme we can have the following (can change widths, colors, etc).
Note: OpenAndroMaps use
k="ele"
and Freizeitkarte usek="name"
in labels.To understand the theme rules please see the render theme documentation for each library: