Thanks to Dane and Jon for your input. Turns out to be a different problem.
I made some other changes. I am now drawing 2 features, one symbol and
one line. I setup a styles with the following rules:
<Rule>
<Filter>[mapnik:geometry] = '1' and [point_symbol] = 'cemetery'</Filter>
<PointSymbolizer file="$MSLHOME/syms/cemetery.png" type="png"
width="20" height="20" allow_overlap="true"/>
<TextSymbolizer name="name" face_name="DejaVu Sans Bold" size="9"
fill="#000" halo_radius="1" placement="point" dy="-20"/>
</Rule>
<Rule>
<Filter>[highway] = 'unclassified'</Filter>
<LineSymbolizer>
<CssParameter name="stroke">#999</CssParameter>
<CssParameter name="stroke-width">11</CssParameter>
<CssParameter name="stroke-linejoin">round</CssParameter>
<CssParameter name="stroke-linecap">round</CssParameter>
</LineSymbolizer>
</Rule>
<Rule>
<Filter>[highway] = 'unclassified'</Filter>
<LineSymbolizer>
<CssParameter name="stroke">#fff</CssParameter>
<CssParameter name="stroke-width">9.4</CssParameter>
<CssParameter name="stroke-linejoin">round</CssParameter>
<CssParameter name="stroke-linecap">round</CssParameter>
</LineSymbolizer>
</Rule>
<Rule>
<Filter>[mapnik:geometry] = '2'</Filter>
<TextSymbolizer name="name" face_name="DejaVu Sans Book" size="9"
fill="#000" halo_radius="1" placement="line"/>
</Rule>
I have confirmed the attributes are setup properly for the two
features. I see the label for the line but not for the symbol (point
feature) if I draw the symbol. However, if I change the label line:
<TextSymbolizer name="name" face_name="DejaVu Sans Bold" size="9"
fill="#000" halo_radius="1" placement="point" dy="-20"/>
It will not draw the label if the symbol is there or not there. If I
change this to:
<TextSymbolizer name="name" face_name="DejaVu Sans Bold" size="9"
fill="#000" halo_radius="1" placement="point" dy="20"/>
Then is renders properly (positive dy rather than negative dy) with the
label below the symbol.
If I take out the dy= part it only draw the label if I don't draw the
symbol.
I assumed a negative dy would move the label below the symbol and a
positive dy would move the label above the symbol. The Open Street Map
XML file uses both positive and negative dy values.
Does this sound like a bug or user error? I would like the ability to
specify the label above the symbol in some cases (if possible).
I am also not sure what the wrap_width means. Setting it to 0 seems to
have no effect. I am guessing it needs to find a space in the label
before it wraps the text.
- B
--
Brian Peschel
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users