Customising OsmAnd Map Rendering *.render.xml

56 views
Skip to first unread message

Marcus

unread,
Jul 4, 2024, 10:56:00 AMJul 4
to OsmAnd
Can anyone tell me how to customise the rendering of a node (OSM) / point (OsmAnd) based on the name or brand of a shop (to display the brand logo, for example)?

Example, how would I render a different icon for Lidl supermarkets?

I can render different icons based on additional tags with an XML file like this (I took this from default.render.xml and it works for different types of parking so the additional tags are working as selectors):

<?xml version="1.0" encoding="UTF-8"?>
<renderingStyle name="My Custom Render" depends="default" defaultColor="#f1eae4" version="1">
<point>
<switch shield="blue_round_shield">
<case minzoom="16" tag="amenity" value="parking" icon="icon1" iconVisibleSize="38" iconOrder="151">
<case additional="parking=multi-storey" icon="icon2"/>
<case additional="parking=underground" icon="icon3"/>
<case additional="fee=yes" icon="icon4"/>
</case>
</switch>
</point>
</renderingStyle>

But I have tried lots of variations on:
<switch shield="blue_round_shield">
<case minzoom="16" tag="shop" value="supermarket" icon="icon1" iconVisibleSize="38" iconOrder="151">
<case additional="name=Lidl" icon="icon2"/>
<case additional="brand=Lidl" icon="icon3"/>  
</case>
</switch> 

and I have not found any way of doing this.  In this case icon1 is displayed for all supermarkets since I cannot match name or brand to Lidl.

It seems like it should be trivial having got different icons displaying for different parking attributes but trial and error is not working for me!  Does anyone know the correct XML to check additional tags such as name and brand?

Thanks,
Marcus



Harry van der Wolf

unread,
Jul 4, 2024, 11:00:39 AMJul 4
to osm...@googlegroups.com
Message as co-moderator of this group.

Your email message was automatically blocked. After reading it, I unblocked it.
Why do you use the email address "wonderfu...@gmail.com"?
It might be blocked again.
Please use a more sensible one not containing spam or a likewise phrase.

Kind regards,
Harry van der Wolf

Op do 4 jul 2024 om 16:55 schreef Marcus <wonderfu...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "OsmAnd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osmand/856197d0-3cb9-40d9-a47e-c19173dff637n%40googlegroups.com.

Egal

unread,
Jul 10, 2024, 2:39:34 PM (12 days ago) Jul 10
to OsmAnd
I do not understand the rendering of OsmAnd completely, because of missing and wrong documentations.
I think it is not possible to use external icons. All icons you will use for rendering has to be internal icons, which are implemented in OsmAnd. Icons of brands are not implemented in OsmAnd, because they would need too much memory.

xmd5a

unread,
Jul 12, 2024, 3:16:31 AM (11 days ago) Jul 12
to OsmAnd
It is not possible to use custom icons in OsmAnd. Also brand tag should be of type additional="true" (not text) in rendering_types.xml. Doing so will break POI info, so you need to add separate artificial tag using entity_convert.
среда, 10 июля 2024 г. в 21:39:34 UTC+3, Egal:
Reply all
Reply to author
Forward
0 new messages