Package com.yandex.mapkit.map

Interface Cluster

interface Cluster

Summary

Methods

Type and modifiers

Method and Description

java.util.List<PlacemarkMapObject>

getPlacemarks()
A list of placemarks the cluster contains.

int

getSize()
Cluster size.

PlacemarkMapObject

getAppearance()
Cluster representation displayed on the map.

void

addClusterTapListener(@NonNull ClusterTapListener clusterTapListener)
Adds a tap listener for cluster.

void

removeClusterTapListener(@NonNull ClusterTapListener clusterTapListener)
Removes tap listener.

boolean

isValid()
Tells if this Cluster is valid or not.

Methods

getPlacemarks

@NonNull
java.util.List<PlacemarkMapObject> getPlacemarks()

A list of placemarks the cluster contains.


getSize

int getSize()

Cluster size.


getAppearance

@NonNull
PlacemarkMapObject getAppearance()

Cluster representation displayed on the map.


addClusterTapListener

void addClusterTapListener(@NonNull ClusterTapListener clusterTapListener)

Adds a tap listener for cluster.

The class does not retain the object in the 'clusterTapListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.


removeClusterTapListener

void removeClusterTapListener(@NonNull ClusterTapListener clusterTapListener)

Removes tap listener.


isValid

boolean isValid()

Tells if this Cluster is valid or not.

Any other method (except for this one) called on an invalid Cluster will throw java.lang.RuntimeException. An instance becomes invalid only on UI thread, and only when its implementation depends on objects already destroyed by now. Please refer to general docs about the interface for details on its invalidation.