Configuration Options for ShieldSymbolizer

nameThis is the query field you want to use for the label text, e.g. "ref"
face_nameFont name for the shield text
sizeFont size of the shield text
fillColor of the shield text, e.g. #FFFFFF
fileThe file to use for the shield background
typeType of the shield file, e.g. "png"
widthThe width of the shield file
heightThe height of the shield file
spacingThe spacing between repeated occurrences of the same shield
min_distanceMinimum distance to the next shield symbol (not necessarily the same shield)
placement"line" or "point"
allow_overlapAllow the symbolizer to overlap others. Defaults to 'false'
dx/dyOffset the text. Unit: pixels.

Examples


http://wiki.openstreetmap.org/images/thumb/6/63/Mapnik-highway-motorway.png/120px-Mapnik-highway-motorway.png


http://media.mapnik.org/images/streets2.png

Setting up a sample shield symbolizer, from the Cascade Users of OpenSource GeoSpatial (CUGOS) list: http://groups.google.com/group/cugos/browse_thread/thread/b62b4890e1933bba

Default

XML

<Style name="My Style">
    <Rule>
        <ShieldSymbolizer name="NAME" face_name="DejaVu Sans Bold" size="6" fill="#000000" min_distance="50" file="images/ushighway_shield_20.png" type="png" width="20" height="20" spacing="100" min_distance="50"></ShieldSymbolizer>
    </Rule>
</Style>

Python

shield = ShieldSymbolizer('NAME','DejaVu Sans Bold',6,Color('#000000'),'images/ushighway_shield_20.png','png',20,20)
# parameters are: (name, font name, font size, font color, image file, image type, width, height)
shield.minimum_distance = 50
shield.label_spacing = 100

C++

FIXME