MapPolygon constructor - MapPolygon - mapview library - Dart API
MapPolygon
MapPolygon constructor
- GeoPolygon geometry,
- Color color
Creates a new MapPolygon instance with outline visualization disabled and containing the geometry passed in.
The winding order of the vertices can be in clockwise or counter-clockwise order. It is recomended to provide the outer boundary ordered clockwise and closed.
Note:
-
The polygon shape should not cover more than half of the globe, otherwise unexpected results may occur.
-
Polygons which are self-intersecting are not supported and may lead to render artifacts.
-
The inner boundaries (holes) specified in the GeoPolygon are ignored.
-
geometryThe list of vertices representing the outer boundary of polygon. -
colorThe fill color for the polygon
Implementation
factory MapPolygon(GeoPolygon geometry, ui.Color color) => $prototype.$init(geometry, color);