Defines a polygon on a map.
Name | Type | Description |
|---|---|---|
polygonId | Unique polygon ID. | |
clickable | bool | Indicates whether a polygon is tappable. |
fillColor | Color | Fill color. |
geodesic | bool | Indicates whether to draw each segment of a polygon as a geodesic. The options are true (yes) and false (no). |
points | List<LatLng> | Vertex coordinate set. |
visible | bool | Indicates whether a polygon is visible. |
strokeColor | Color | Stroke color. |
strokeWidth | int | Stroke width of a polygon. |
zIndex | int | Z-index of a polygon, which indicates the overlapping order of the polygon. |
onClick | VoidCallback? | Function executed when a polygon is tapped. |
holes | List<List<LatLng>> | Holes in a polygon. |
strokeJointType | Joint type of a polygon. | |
strokePattern | List<PatternItem> | Stroke pattern of a polygon. |
Creates a Polygon object.
Parameter | Type | Description |
|---|---|---|
polygonId | Unique polygon ID. | |
clickable | bool | Indicates whether a polygon is tappable. |
fillColor | Color | Fill color. |
geodesic | bool | Indicates whether to draw each segment of a polygon as a geodesic. The options are true (yes) and false (no). |
points | List<LatLng> | Vertex coordinate set. |
visible | bool | Indicates whether a polygon is visible. |
strokeColor | Color | Stroke color. |
strokeWidth | int | Stroke width of a polygon. |
zIndex | int | Z-index of a polygon, which indicates the overlapping order of the polygon. |
onClick | VoidCallback? | Function executed when a polygon is tapped. |
holes | List<List<LatLng>> | Holes in a polygon. |
strokeJointType | Joint type of a polygon. | |
strokePattern | List<PatternItem> | Stroke pattern of a polygon. |
Method | Return Type | Description |
|---|---|---|
Polygon | Copies an existing Polygon object and updates the specified attributes. | |
Polygon | Clones a Polygon object. |
Copies an existing Polygon object and updates the specified attributes.
Parameter | Type | Description |
|---|---|---|
clickable | bool? | Indicates whether a polygon is tappable. |
fillColor | Color? | Fill color. |
geodesic | bool? | Indicates whether to draw each segment of a polygon as a geodesic. The options are true (yes) and false (no). |
points | List<LatLng>? | Vertex coordinate set. |
visible | bool? | Indicates whether a polygon is visible. |
strokeColor | Color? | Stroke color. |
strokeWidth | int? | Stroke width of a polygon. |
zIndex | int? | Z-index of a polygon, which indicates the overlapping order of the polygon. |
onClick | VoidCallback? | Function executed when a polygon is tapped. |
holes | List<List<LatLng>>? | Holes in a polygon. |
strokeJointType | Joint type of a polygon. | |
strokePattern | List<PatternItem>? | Stroke pattern of a polygon. |
Return Type | Description |
|---|---|
Polygon | Polygon object. |
Call example:
// Define a Polygon object. Polygon polygon; // Call the updateCopy method. polygon = polygon!.updateCopy(clickable: true);