Locus Map - forum

Content & Tools => Themes - Vector maps => Topic started by: dimmel on June 24, 2012, 12:11:33

Title: Custom theme with attribute filtering
Post by: dimmel on June 24, 2012, 12:11:33
Hi,

I am using these vector maps here which work great: viewtopic.php?f=40&t=2066 (http://forum.locusmap.eu/viewtopic.php?f=40&t=2066)
One thing I am interested in are drinking water locations for outdoor activities. Christian's template already includes the "drinking_water" amenity. But there are also other sources for drinking water: "natural"+"spring" and "amenity"+"fountain". These can have the attribute "drinking_water" as well.

Is it possible to show only "springs" and fountains which have the attribute "drinking_water"?
The xml code for a spring looks like this at the moment:
<rule e="node" k="natural" v="spring" zoom-min="14" zoom-max="20">
 <symbol src="file:/symbols/spring_32.png" />
</rule>

Regards,
Title: Re: Custom theme with attribute filtering
Post by: jusc on June 24, 2012, 13:27:45
Can you post one or two examples as screenshots and the coordinates of a spring which should be shown and which not. I can try to figure it out.
Title: Re: Custom theme with attribute filtering
Post by: dimmel on June 24, 2012, 14:02:05
Some more research revealed that it is not possible to filter by attribute as I need it because only "|" (concat) is supported: http://code.google.com/p/mapsforge/wiki/RenderThemeAPI (http://code.google.com/p/mapsforge/wiki/RenderThemeAPI)

But I can show all drinking water POIs using this:
<rule e="node" k="drinking_water" v="yes" zoom-min="14" zoom-max="20">

Better would be support for an "AND" operator (not working) [1]:


<rule e="node" k="natural" v="spring" zoom-min="14" zoom-max="20">
  <rule e="node" k="drinking_water" v="yes" zoom-min="14" zoom-max="20" />
</rule>

I will file this as a feature request to mapsforge people.

[1] http://wiki.openstreetmap.org/wiki/Osma ... .3Crule.3E (http://wiki.openstreetmap.org/wiki/Osmarender/Rules#.3Crule.3E)