MFPolygon class

Draws a gon through geographical locations on the map.

Annotations

Constructors

MFPolygon({required MFPolygonId polygonId, bool consumeTapEvents = false, Color fillColor = Colors.black, List<MFLatLng> points = const <MFLatLng>[], List<List<MFLatLng>> holes = const <List<MFLatLng>>[], Color strokeColor = Colors.black, int strokeWidth = 10, bool visible = true, int zIndex = 0, VoidCallback? onTap})
Creates an immutable object representing a gon drawn through geographical locations on the map.
const

Properties

consumeTapEvents bool
True if the Polygon consumes tap events.
final
fillColor Color
Fill color in ARGB format, the same format used by Color. The default value is black (0xff000000).
final
hashCode int
The hash code for this object.
no setteroverride
holes List<List<MFLatLng>>
To create an empty area within a polygon, you need to use holes. To create the hole, the coordinates defining the hole path must be inside the polygon.
final
mapsId MFPolygonId
A identifier for this object.
no setter
onTap VoidCallback?
Callbacks to receive tap events for polygon placed on this map.
final
points List<MFLatLng>
The vertices of the polygon to be drawn.
final
polygonId MFPolygonId
Uniquely identifies a Polygon.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
strokeColor Color
Line color in ARGB format, the same format used by Color. The default value is black (0xff000000).
final
strokeWidth int
Width of the polygon, used to define the width of the line to be drawn.
final
visible bool
True if the marker is visible.
final
zIndex int
The z-index of the polygon, used to determine relative drawing order of map overlays.
final

Methods

clone() MFPolygon
Creates a new MFPolygon object whose values are the same as this instance.
copyWith({bool? consumeTapEventsParam, Color? fillColorParam, List<MFLatLng>? pointsParam, List<List<MFLatLng>>? holesParam, Color? strokeColorParam, int? strokeWidthParam, bool? visibleParam, int? zIndexParam, VoidCallback? onTapParam}) MFPolygon
Creates a new Polygon object whose values are the same as this instance, unless overwritten by the specified parameters.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Object
Converts this object to something serializable in JSON. Converts this object to something serializable in JSON.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override