MapMarkerCluster class abstract

Groups map markers and enables their clustering to reduce visual clutter when there are many of them in a small area.

The markers that are close to each other are replaced by a single cluster marker. Cluster groups are generated based on geographical distance between objects, not based on screen space collision. Hence it is possible, that cluster markers can overlap.

The markers can be added to a cluster or to a scene, but not to both. To display the cluster on the map, add it to the scene using MapScene.addMapMarkerCluster. The display of a cluster is only guaranteed in case its origin is within the viewport. At the moment, this is a known limitation that mostly affects clusters which are visually large and cover a sizeable part of the viewport.

Markers part of the cluster with opacity set to zero are still on the map and are considered for picking and clustering.

Constructors

MapMarkerCluster(MapMarkerClusterImageStyle imageStyle)
Creates a new instance of a map marker cluster which is represented as an image.
factory
MapMarkerCluster.WithCounter(MapMarkerClusterImageStyle imageStyle, MapMarkerClusterCounterStyle counterStyle)
Creates a new instance of a map marker cluster which is represented as an image along with a counter showing how many markers are actually grouped under particular cluster icon.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
markers → List<MapMarker>
The list of map markers which currently belong to this cluster. Modifying the list has no effect on the marker cluster. Returns the list of map markers which currently belong to this cluster.
no setter
opacity ↔ double
Opacity is the factor which is applied to the alpha channel of the image used for marker cluster. Gets the current opacity of the marker cluster image.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addMapMarker(MapMarker marker) → void
Adds a map marker to this cluster.
addMapMarkers(List<MapMarker> markers) → void
Adds a list of map markers to this cluster.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeAllMapMarkers() → void
Removes all map markers from this cluster.
removeMapMarker(MapMarker marker) → void
Removes a map marker from this cluster.
removeMapMarkers(List<MapMarker> markers) → void
Removes a list of map markers from this cluster.
toString() → String
A string representation of this object.
inherited

Operators

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