目录

Polygon

Defines a polygon on a map.

Properties

Name

Type

Description

polygonId

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

JointType

Joint type of a polygon.

strokePattern

List<PatternItem>

Stroke pattern of a polygon.

Constructor Summary

Constructors

[h2]Polygon

Creates a Polygon object.

Parameter

Type

Description

polygonId

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

JointType

Joint type of a polygon.

strokePattern

List<PatternItem>

Stroke pattern of a polygon.

Method Summary

Methods

[h2]Polygon.updateCopy

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

JointType?

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);

[h2]Polygon.clone

Clones a Polygon object.

Return Type

Description

Polygon

Polygon object.

Call example:

// Define a Polygon object.
Polygon polygon; 
Polygon polygon2; 
 
// Call the clone method.
polygon2 = polygon!.clone();