[OSM-dev] Another mapnik style sheet question
John Smith
delta_foxtrot at yahoo.com
Tue Aug 4 14:08:33 BST 2009
I've been trying to find a good reference for mapnik but most doco assumes you know all about it and they're more or less a reference, but that doesn't help.
I'm trying to replace the highway shields for various roads, however I'm doing a one size fits all approach and just altering the fontsize, which works, but the text isn't centring and another highway shield I need to push the text more toward the top rather than being centred vertically.
<Rule>
<Filter>([highway] = 'motorway' or [highway] = 'trunk' or [highway] = 'primary' or [highway] = 'secondary' or [highway] = 'tertiary' or [highway] = 'residential' or [highway] = 'unclassified') and [ref2] = 'MR' and [length] = 5</Filter>
<MaxScaleDenominator>2500000</MaxScaleDenominator>
<MinScaleDenominator>100</MinScaleDenominator>
<ShieldSymbolizer name="name2" face_name="DejaVu Sans Bold" size="10" fill="#164b97" placement="line" file= "/var/lib/mod_tile/symbols/shield_metro.png" type="png" width="24" height="28" min_distance="0" spacing="0"/>
</Rule>
I altered the Query to dump the first 2 chars of ref into ref2, and name2 stores the ref without the first 2 chars, which all works, it's just not lining up with the replacement image properly.
More information about the dev
mailing list