PolygonMapObject class

A polygon to be displayed on YandexMap

Implemented types

Constructors

PolygonMapObject({required MapObjectId mapId, required Polygon polygon, bool isGeodesic = false, double zIndex = 0.0, TapCallback<PolygonMapObject>? onTap, bool consumeTapEvents = false, bool isVisible = true, double strokeWidth = 1, Color strokeColor = const Color(0xFF0066FF), Color fillColor = const Color(0x00000000)})
const

Properties

consumeTapEvents bool
True if the placemark consumes tap events. If not, the map will propagate tap events to other map objects at the point of tap.
final
fillColor Color
Fill color.
final
hashCode int
The hash code for this object.
no setterinherited
isGeodesic bool
The object's geometry can be interpreted in two different ways:
final
isVisible bool
Manages visibility of the object on the map.
final
mapId MapObjectId
A unique identifier for this object in the scope of a single YandexMap
final
onTap TapCallback<PolygonMapObject>?
Callback to call when this polygon receives a tap
final
polygon Polygon
The geometry of the map object.
final
props List<Object>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool
If set to true, the toString method will be overridden to output this instance's props.
no setter
strokeColor Color
Stroke color.
final
strokeWidth double
Stroke width in units.
final
zIndex double
z-order
final

Methods

clone() PolygonMapObject
Returns a duplicate of this object.
override
copyWith({Polygon? polygon, List<List<Point>>? innerRingsCoordinates, bool? isGeodesic, double? zIndex, TapCallback<PolygonMapObject>? onTap, bool? consumeTapEvents, bool? isVisible, Color? fillColor, Color? strokeColor, double? strokeWidth}) PolygonMapObject
dup(MapObjectId mapId) PolygonMapObject
Creates a new copy of T with the same attributes as the original except its id
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this object to something serializable in JSON.
override
toString() String
A string representation of this object.
inherited

Operators

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