Polygon class

Draws a polygon through geographical locations on the map.

Annotations

Constructors

Polygon({@required PolygonId polygonId, bool consumeTapEvents: false, Color fillColor: Colors.black, bool geodesic: false, List<LatLng> points: const <LatLng>[], Color strokeColor: Colors.black, int strokeWidth: 10, bool visible: true, int zIndex: 0, VoidCallback onTap})
Creates an immutable representation of a polygon 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
geodesic bool
Indicates whether the segments of the polygon should be drawn as geodesics, as opposed to straight lines on the Mercator projection. [...]
final
hashCode int
The hash code for this object. [...]
read-only, override
onTap VoidCallback
Callbacks to receive tap events for polygon placed on this map.
final
points List<LatLng>
The vertices of the polygon to be drawn. [...]
final
polygonId PolygonId
Uniquely identifies a Polygon.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
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() Polygon
Creates a new Polygon object whose values are the same as this instance.
copyWith({bool consumeTapEventsParam, Color fillColorParam, bool geodesicParam, List<LatLng> pointsParam, Color strokeColorParam, int strokeWidthParam, bool visibleParam, int zIndexParam, VoidCallback onTapParam}) Polygon
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 non-existent method or property is accessed. [...]
inherited
toJson() → dynamic
Converts this object to something serializable in JSON.
toString() String
Returns a string representation of this object.
inherited

Operators

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