+ filter on geometry type to use centroid (Polygon) or
middle_point (LineString) label placement
This commit is contained in:
parent
8931509adc
commit
822531a114
1 changed files with 8 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue