+ filter on geometry type to use centroid (Polygon) or

middle_point (LineString) label placement
This commit is contained in:
artemp 2012-07-30 18:32:42 +01:00
parent 8931509adc
commit 822531a114

View file

@ -244,7 +244,14 @@ void text_symbolizer_helper<FaceManagerT, DetectorT>::initialize_points()
{
if (how_placed == POINT_PLACEMENT)
{
label::centroid(geom, label_x, label_y);
if (geom.type() == Polygon)
{
label::centroid(geom, label_x, label_y);
}
else if (geom.type() == LineString)
{
label::middle_point(geom, label_x,label_y);
}
}
else if (how_placed == INTERIOR_PLACEMENT)
{