MapPolygon.withOutlineColorAndOutlineWidthInPixels constructor
- GeoPolygon geometry,
- Color color,
- Color outlineColor,
- double outlineWidthInPixels,
Creates a new MapPolygon instance with outline visualization enabled and containing the geometry passed in.
Transparent outlines are not supported. Any color with transparency (alpha value other than 1) will be rendered as fully opaque by interpreting the alpha value as 1.
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. -
outlineColorThe color of the polygon outline, alpha channel is ignored and treated as 1. -
outlineWidthInPixelsThe width of the polygon outline (in pixels). Negative values are clamped to 0.
Implementation
factory MapPolygon.withOutlineColorAndOutlineWidthInPixels(GeoPolygon geometry, ui.Color color, ui.Color outlineColor, double outlineWidthInPixels) => $prototype.withOutlineColorAndOutlineWidthInPixels(geometry, color, outlineColor, outlineWidthInPixels);