Custom theme with attribute filtering

Started by dimmel, June 24, 2012, 12:11:33

0 Members and 2 Guests are viewing this topic.

dimmel

Hi,

I am using these vector maps here which work great: 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,
  •  

jusc

#1
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.
Regards J.
  •  

dimmel

#2
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

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
  •