MapPolygon constructor

MapPolygon(
  1. GeoPolygon geometry,
  2. 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.

  • geometry The list of vertices representing the outer boundary of polygon.

  • color The fill color for the polygon

Implementation

factory MapPolygon(GeoPolygon geometry, ui.Color color) => $prototype.$init(geometry, color);