Hi all -
There are lots of queries against IRC and the lists about this, so I've filed a
ticket (http://trac.mapnik.org/ticket/547) and patch
(http://trac.mapnik.org/attachment/ticket/547/text_minimum_padding.diff) and am
sending to this list.
This question comes up frequently: "How can I get mapnik not to cutoff my
highway shields?"
The problem is that the placement_finder algorithm only takes into account the
envelope of the shield text when considering if the placement is valid if avoid
edges is turned on. Thus you may have a chopped off label/symbol at the edge of
a tile. When metatiles are used with Map.buffer_size > 0, and particularly with
line placement, things go goofy: part of a shield is rendered in the buffer,
but on the next metatile over, that shield isn't often rendered in that same
location.
I've addressed this by adding a minimum_padding property to the TextSymbolizer,
which prevents a label (or shield) from being placed too near the edge of the
map. If for the placement under consideration, the text envelope + padding are
not contained by the map extent, the label will not be placed at that location.
Margin might be a better term than padding for consistency with CSS. This could
also be min-padding-x and min-padding-y, but as buffer_size is consistent on
all sides and shields are usually squarish in shape, I didn't go crazy with
expanding all the options.
Hopefully the core dev team will consider this for inclusion in the next
release. Please... :)
- Nino
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users