Groups IconMapObject instances into clusters depending on zoom and proximity. More...
Public Member Functions | |
| abstract boolean | addIconMapObject (IconMapObject iconMapObject) |
| Adds an icon map object to the cluster controller. | |
| abstract boolean | removeIconMapObject (IconMapObject iconMapObject) |
| Removes an icon map object from the cluster controller. | |
| abstract void | clear () |
| Removes all icon map objects from the controller and destroys visible cluster markers. | |
| abstract void | setEnabled (boolean enabled) |
| Enables or disables clustering. Default: true. | |
| abstract boolean | isEnabled () |
| Returns whether clustering is enabled. | |
| abstract void | setRadius (float radius) |
| Cluster radius in density-independent pixels. Default: 40. | |
| abstract float | getRadius () |
| Returns cluster radius in density-independent pixels. | |
| abstract boolean | setInteractive (boolean interactive) |
| Specifies whether cluster markers can be picked. Default: true. | |
| abstract boolean | setClusterSize (float width, float height) |
| Specifies the size of the default cluster icon in pixels. | |
| abstract void | addListener (ClusterMapObjectControllerListener listener) |
| Adds a listener for cluster lifecycle events ClusterMapObjectControllerListener. | |
| abstract void | removeListener (ClusterMapObjectControllerListener listener) |
| Removes a previously added listener. | |
| abstract ArrayList< ClusterMapObject > | getClusters () |
| Returns a snapshot of currently visible clusters. | |
Groups IconMapObject instances into clusters depending on zoom and proximity.
Referenced from LocationWindow.
Register icons with addIconMapObject, then optionally customize cluster appearance in ClusterMapObjectControllerListener (onClusterCreated) and ClusterMapObjectListener (onClusterChanged).
Definition at line 23 of file ClusterMapObjectController.java.
|
abstract |
Adds an icon map object to the cluster controller.
| iconMapObject | Icon to cluster IconMapObject. Must be added to the same LocationWindow via addIconMapObject. |
Java code snippet:
Kotlin code snippet:
|
abstract |
Adds a listener for cluster lifecycle events ClusterMapObjectControllerListener.
| listener | Listener instance. |
Java code snippet:
Kotlin code snippet:
|
abstract |
Removes all icon map objects from the controller and destroys visible cluster markers.
Java code snippet:
Kotlin code snippet:
|
abstract |
Returns a snapshot of currently visible clusters.
Java code snippet:
Kotlin code snippet:
|
abstract |
Returns cluster radius in density-independent pixels.
Java code snippet:
Kotlin code snippet:
|
abstract |
Returns whether clustering is enabled.
Java code snippet:
Kotlin code snippet:
|
abstract |
Removes an icon map object from the cluster controller.
| iconMapObject | Icon to remove. |
Java code snippet:
Kotlin code snippet:
|
abstract |
Removes a previously added listener.
| listener | Listener instance to remove. |
Java code snippet:
Kotlin code snippet:
|
abstract |
Specifies the size of the default cluster icon in pixels.
Java code snippet:
Kotlin code snippet:
|
abstract |
Enables or disables clustering. Default: true.
Java code snippet:
Kotlin code snippet:
|
abstract |
Specifies whether cluster markers can be picked. Default: true.
Java code snippet:
Kotlin code snippet:
|
abstract |
Cluster radius in density-independent pixels. Default: 40.
Java code snippet:
Kotlin code snippet: