[Tilesathome] patch for place_of_worship-icons
Martin Koppenhoefer
dieterdreist at gmail.com
Tue Nov 11 11:30:52 GMT 2008
2008/11/11 Raphael Studer <studerap at gmail.com>:
>> I think you made a change here (got no SVN here at my workplace):
>>
>> <rule e="way" k="amenity|shop"
>> v="school|college|university|restaurant|shelter|supermarket|library|doctors|pharmacy|place_of_worship|parking|post_office|hospital|hotel|hostel|camp_site|bank|bus_station"
>> layer="5">
>> <areaText k="name" class="caption-casing generic-caption-casing"
>> dy='-2.5px' text-anchor='middle' startOffset='50%' layer="5"/>
>> <areaText k="name" class="caption-core generic-caption-core"
>> dy='-2.5px' text-anchor='middle' startOffset='50%' layer="5"/>
>> </rule>
>>
>>
>> This part of the code (followed) seems hard to extend and seems to
>> exagerate the importance of sport, as it puts the building-tag nested
>> inside a sport-rule.
>>
>> I think if we would keep things simple where it could be, that would
>> help for the extension of the rules with other tags.
>>
>> <rule e="way" k="sport" v="~" layer="5"> <!-- don't render captions
>> for buildings, if sport is also set, thus honor offsets -->
>> <rule e="way" k="building" v="*" layer="5">
>> <!-- same goes if one of the following is set -->
>> <rule e="way" k="amenity|shop"
>> v="school|college|university|parking|supermarket" layer="5">
>> </rule>
>> <else>
>> <areaText k="name" class="caption-casing generic-caption-casing"
>> text-anchor='middle' startOffset='50%' layer="5"/>
>> <areaText k="name" class="caption-core generic-caption-core"
>> text-anchor='middle' startOffset='50%' layer="5"/>
>> </else>
>> </rule>
>> </rule>
>>
>> I'm not sure about this, maybe I'm wrong an the rules are fine as they
>> are (and are also easily extensible). What do you think?
>
> I think you're right..
>
> These rules looks a little bit strange..
>
> They don't want to have an offset if its a sport tag with a building
> tag without a amenity|shop ...
>
> Why should sport buildings not have an offset?
>
it's not that they don't have the offset, the rule won't render the
building-text if there is already a symbol-text (means a different
rule for the text).
For Sport that's because they are treated somehow different (the code
is some lines before:
<rule e="way" k="sport" v="*" layer="5">
<!-- Offset captions for areas with icons -->
<rule e="way" k="sport" v="soccer|tennis|swimming" layer="5">
<areaText k="name" class="caption-casing generic-caption-casing"
text-anchor="middle" startOffset="50%" dy="3.5px" layer="5"/>
<areaText k="name" class="caption-core generic-caption-core"
text-anchor="middle" startOffset="50%" dy="3.5px" layer="5"/>
</rule>
<else>
<areaText k="name" class="caption-casing generic-caption-casing"
text-anchor="middle" startOffset="50%" layer="5"/>
<areaText k="name" class="caption-core generic-caption-core"
text-anchor="middle" startOffset="50%" layer="5"/>
</else>
</rule>
).
Btw: The new patch introduced some features that are different to mapfeatures:
- instead of tourism=museum it uses historic=museum (what could be
senseful anyway as a variant, so it's not wrong in my opinion, but
till now not defined)
- it puts hotel and hostel to amenity where it is defined as tourism
- there is a simple typo in this (older) fragment (the first value is
attraction, not tourism-attraction):
<rule e="way" k="tourism"
v="tourism-attraction|zoo|picnic_site|caravan_site|camp_site"
layer="5">
<areaText k="name" class="caption-casing generic-caption-casing"
text-anchor="middle" startOffset="50%" layer="5"/>
<areaText k="name" class="caption-core generic-caption-core"
text-anchor="middle" startOffset="50%" layer="5"/>
Martin
More information about the Tilesathome
mailing list