Hi,

 

I have a shapefile containing details of all text labels to appear on the
map. Each text element in the shapefile contains attributes including
FONTHEIGHT, FONTCOLOUR, and FONTTYPE, which I'd like to map to the "size",
"fill", and "face_name" properties of the TextSymbolizer applied to this
layer, but I seem to be unable to do so.

In other words, I'd like to use syntax such as this in my styles.xml file:

 

<Style name="text">

    <Rule>

      <TextSymbolizer 

          name="NAME" 

          face_name="FONTTYPE" 

          size="FONTHEIGHT"

          fill="FONTCOLOUR" 

          />

    </Rule>

</Style>

 

However, it seems that the only property from the TextSymbolizer that can be
(and indeed *has* to be) mapped to a field from the data layer is the "name"
field. How do I set values for the other properties based on attributes in
the data? (The only way I've been successful so far is to create a ton of
<Rule>s to filter for each combination of type/size/colour, but there's got
to be a better way!)

 

Thanks for any advice!

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to