MPPolygon class

MPPolygon is a collection of MPPoints that combine to form a single geographical area with a single body

Inheritance

Constructors

MPPolygon()
Create a empty MPPolygon, remember to set coordinates for proper use

Properties

area → Future<num?>
Get the polygon' area
no setteroverride
bbox ↔ List<num>
Get the polygon' bounding box, the bounding box is in GeoJSON format
getter/setter pair
bounds → MPBounds
Get the polygon' bounds. If bbox is present then that will be used, otherwise a MPBounds will be created from the coordinates of the polygon
no setter
coordinates ↔ List<List<List<num>>>
Get the coordinates as a collection in GeoJSON format
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
points → List<List<MPPoint>>
Get the points the polygon consists of in GeoJSON format
no setter
position → MPPoint
Get the position of the polygon, which is roughly the center
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
Used to determine the proper type of a MPGeometry
no setteroverride

Methods

contains(MPPoint point) → Future<bool?>
Check whether a point is contained within the geometry
inherited
getSquaredDistanceToClosestEdge(MPPoint point) → Future<num?>
Calculates the squared distance from the point to the closest edge in the polygon.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts the MPPolygon to a JSON representation that can be parsed by the MapsIndoors Platform SDK
override
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(dynamic json) → MPPolygon?
Attempts to build a MPPolygon from a JSON object, this method will decode the object if needed