make text_symbolizer behave like shield_symbolizer
This commit is contained in:
parent
e598348e56
commit
ae568d3223
1 changed files with 2 additions and 2 deletions
|
@ -763,7 +763,7 @@ namespace mapnik
|
||||||
path_type path(t_,geom,prj_trans);
|
path_type path(t_,geom,prj_trans);
|
||||||
placement text_placement(info,sym);
|
placement text_placement(info,sym);
|
||||||
text_placement.avoid_edges = sym.get_avoid_edges();
|
text_placement.avoid_edges = sym.get_avoid_edges();
|
||||||
if (sym.get_label_placement() == POINT_PLACEMENT || geom.num_points() == 1)
|
if (sym.get_label_placement() == POINT_PLACEMENT)
|
||||||
{
|
{
|
||||||
double label_x, label_y, z=0.0;
|
double label_x, label_y, z=0.0;
|
||||||
geom.label_position(&label_x, &label_y);
|
geom.label_position(&label_x, &label_y);
|
||||||
|
@ -772,7 +772,7 @@ namespace mapnik
|
||||||
finder.find_point_placement(text_placement,label_x,label_y);
|
finder.find_point_placement(text_placement,label_x,label_y);
|
||||||
finder.update_detector(text_placement);
|
finder.update_detector(text_placement);
|
||||||
}
|
}
|
||||||
else //LINE_PLACEMENT
|
else if ( geom.num_points() > 1 && sym.get_label_placement() == LINE_PLACEMENT)
|
||||||
{
|
{
|
||||||
finder.find_line_placements<path_type>(text_placement,path);
|
finder.find_line_placements<path_type>(text_placement,path);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue