SimpleCentroidCalculator class

Places the Polygon.label at the approximate centroid calculated by averaging all the points of the polygon

This is computationally cheap and gives reasonable results for convex polygons. However, for more complex or convex polygons, results may not be as good (but they should still be acceptable).

Important

If the polygon may be over the anti-meridan boundary, SimpleMultiWorldCentroidCalculator must be used - other calculators will produce unexpected results.

Implemented types

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(Polygon<Object> polygon) → LatLng
Given a polygon (and its points), calculate a single position at which the center of the label should be placed
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited