labelPlacement property

PolygonLabelPlacement labelPlacement
final

The placement logic of the Polygon.label

PolygonLabelPlacement.polylabel can be expensive for some polygons. If there is a large lag spike, try using PolygonLabelPlacement.centroid.

Important

If your project allows users to browse across multiple worlds, and your polygons may be over the anti-meridan boundary, PolygonLabelPlacement.centroidWithMultiWorld must be used - other algorithms will produce unexpected results.

Labels will not be drawn if there is not enough space.

Implementation

final PolygonLabelPlacement labelPlacement;