> For Mapnik the (0,0) co-ordinate is in the top left corner and are
> postive in the down/right direction. Positive dy values move the label
> downwards. As you say both positive and negative offsets work for the
> OSM style (e.g. station names are above the symbol with a -ve offset,
> pub names are below with +ve offset[1]).

Using this combination:

<PointSymbolizer file="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"/>

Allows my label below the symbol. The label gets closer to the symbol as 
I decrease dy and stops appearing when I have dy at 15 (I assume the 
label overlaps the symbol at this point and is not drawn).

> I would try increasing the dy to larger values +-40 and make sure the
> label is nowhere near the edge of what you are rendering. I think the
> label will be dropped if it even slightly overlaps with the edge of the
> rendered area. The OSM tiles get rendered with a fairly large off-tile
> gutter to avoid losing names on tile boundaries.

However, no negative value of dy allows the label to be placed above the 
symbol. I have tried -10, -45, -200 and the label just does not appear. 
Putting some debug in the mapnik source shows that the call to 
placement_finder<label_collision_detector4>::find_point_placement() is 
returning no label locations when dy is set to a negative value (where 
setting to a positive 20 finds 1 label location). Which is why I 
pondered if there was a bug in find_point_placement() or if it was user 
error.

Either way, using a large negative value for dy didn't help.

- B

-- 
Brian Peschel


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

Reply via email to