Marker class Markers

A compact model representing a visual geometry placed on the map.

A Marker represents a visual geometry — for example a point, a polyline or a polygon — positioned at geographic coordinates. Markers are suitable for annotations, waypoints or temporary content that require only lightweight metadata (name, id) and a set of coordinates.

A marker can contain multiple parts; each part is a list of Coordinates. Parts allow a single marker to represent multipart geometries (for example: multi-segment polylines or polygons).

Coordinates are managed using add, update, delete, and setCoordinates methods and the marker's geographic extent can be obtained via the area getter.

See also:

Constructors

Marker()
factory
Marker.fromArea(GeographicArea area)
Create a marker from an existing GeographicArea.
factory
Marker.fromCircle(Coordinates centerCoords, double radius)
Create a circular marker centered at centerCoords.
factory
Marker.fromCircleRadii({required Coordinates centerCoords, required double horizRadius, required double vertRadius})
Create an elliptical marker using horizontal and vertical radii around the center.
factory
Marker.fromCoords(List<Coordinates> coordinates)
Create a marker from a list of geographic coordinates.
factory
Marker.fromRectangle(Coordinates topLeft, Coordinates bottomRight)
Create a rectangular marker defined by two corner coordinates.
factory

Properties

area → RectangleGeographicArea
Returns the geographic bounding rectangle that encloses the marker geometry.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasRegisteredAutoReleaseObject ↔ bool
getter/setter pairinherited
id → int
The unique identifier for this marker.
no setter
name ↔ String
The marker's human readable name.
getter/setter pair
partCount → int
The number of parts contained in this marker.
no setter
pointerId → int
The pointer ID of the native object
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(Coordinates coord, {int index = -1, int part = 0}) → void
Add a coordinate to this marker.
delete(int index, {int part = 0}) → void
Remove the coordinate at index from the specified part.
deletePart(int part) → void
Remove an entire part from this marker.
deleteRange(int from, int to, {int part = 0}) → void
Delete a range of coordinates in a part.
dispose() → void
Disposes the native object.
inherited
getCoordinate(int index, int part) → Coordinates
Return the coordinate located at index in part.
getCoordinates({int part = 0}) → List<Coordinates>
Return the coordinates for a specific part of the marker.
getCoordinatesCount({int part = 0}) → int
Returns the number of coordinates in the specified part.
getPartArea(int part) → RectangleGeographicArea
Returns the bounding rectangle for a single part of the marker.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerAutoReleaseObject(int pointerId) → void
Registers an object for auto release.
inherited
setCoordinates(List<Coordinates> coords, {int part = 0}) → void
Replace the coordinates for a specific part.
toString() → String
A string representation of this object.
inherited
update(Coordinates coord, int index, {int part = 0}) → void
Update a specific coordinate in a part.

Operators

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