Defines a polyline on a map.
Name | Type | Description |
|---|---|---|
polylineId | Unique polyline ID. | |
clickable | bool | Indicates whether a polyline is tappable. |
color | Color | Stroke color. |
geodesic | bool | Indicates whether to draw each segment of a polyline as a geodesic. The options are true (yes) and false (no). |
jointType | Joint type of all vertices of a polyline, except the start and end vertices. | |
patterns | List<PatternItem> | Stroke pattern of a polyline. The default value is null, indicating that the stroke pattern is solid. |
points | List<LatLng> | Vertexes of a polyline. Line segments are drawn between consecutive points. A polyline is not closed by default. To form a closed polyline, the start and end vertices must be the same. |
startCap | Start vertex of a polyline. | |
endCap | End vertex of a polyline. | |
visible | bool | Indicates whether a polyline is visible. |
width | int | Stroke width of a polyline. |
zIndex | int | Z-index of a polyline, which indicates the overlapping order of the polyline. |
onClick | VoidCallback? | Function executed when a polyline is tapped. |
Parameter | Type | Description |
|---|---|---|
polylineId | Unique polyline ID. | |
clickable | bool | Indicates whether a polyline is tappable. |
color | Color | Stroke color. |
geodesic | bool | Indicates whether to draw each segment of a polyline as a geodesic. The options are true (yes) and false (no). |
jointType | Joint type of all vertices of a polyline, except the start and end vertices. | |
patterns | List<PatternItem> | Stroke pattern of a polyline. The default value is null, indicating that the stroke pattern is solid. |
points | List<LatLng> | Vertexes of a polyline. Line segments are drawn between consecutive points. A polyline is not closed by default. To form a closed polyline, the start and end vertices must be the same. |
startCap | Start vertex of a polyline. | |
endCap | End vertex of a polyline. | |
visible | bool | Indicates whether a polyline is visible. |
width | int | Stroke width of a polyline. |
zIndex | int | Z-index of a polyline, which indicates the overlapping order of the polyline. |
onClick | VoidCallback? | Function executed when a polyline is tapped. |
Method | Return Type | Description |
|---|---|---|
Polyline | Copies an existing Polyline object and updates the specified attributes. | |
Polyline | Clones a Polyline object. |
Copies an existing Polyline object and updates the specified attributes.
Parameter | Type | Description |
|---|---|---|
clickable | bool? | Indicates whether a polyline is tappable. |
color | Color? | Stroke color. |
geodesic | bool? | Indicates whether to draw each segment of a polyline as a geodesic. The options are true (yes) and false (no). |
jointType | Joint type of all vertices of a polyline, except the start and end vertices. | |
patterns | List<PatternItem>? | Stroke pattern of a polyline. The default value is null, indicating that the stroke pattern is solid. |
points | List<LatLng>? | Vertexes of a polyline. Line segments are drawn between consecutive points. A polyline is not closed by default. To form a closed polyline, the start and end vertices must be the same. |
startCap | Cap? | Start vertex of a polyline. |
endCap | Cap? | End vertex of a polyline. |
visible | bool? | Indicates whether a polyline is visible. |
width | int? | Stroke width of a polyline. |
zIndex | int? | Z-index of a polyline, which indicates the overlapping order of the polyline. |
onClick | VoidCallback? | Function executed when a polyline is tapped. |
Return Type | Description |
|---|---|
Polyline | Polyline object. |
Call example:
// Define a Polyline object. Polyline polyline; // Call the updateCopy method. polyline = polyline!.updateCopy(clickable: true);