Groups IconMapObject instances into clusters depending on zoom and proximity. More...
Inherits Finalizable.
Public Member Functions | |
| bool | addIconMapObject (IconMapObject iconMapObject) |
| Adds an icon map object to the cluster controller. | |
| bool | removeIconMapObject (IconMapObject iconMapObject) |
| Removes an icon map object from the cluster controller. | |
| void | clear () |
| Removes all icon map objects from the controller and destroys visible cluster markers. | |
| void | setEnabled (bool enabled) |
| Enables or disables clustering. Default: true. | |
| bool | isEnabled () |
| Returns whether clustering is enabled. | |
| void | setRadius (double radius) |
| Cluster radius in density-independent pixels. Default: 40. | |
| double | getRadius () |
| Returns cluster radius in density-independent pixels. | |
| bool | setInteractive (bool interactive) |
| Specifies whether cluster markers can be picked. Default: true. | |
| bool | setClusterSize (double width, double height) |
| Specifies the size of the default cluster icon in pixels. | |
| void | addListener (ClusterMapObjectControllerListener listener) |
| Adds a listener for cluster lifecycle events ClusterMapObjectControllerListener. | |
| void | removeListener (ClusterMapObjectControllerListener listener) |
| Removes a previously added listener. | |
| List< 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 27 of file cluster_map_object_controller.dart.
| bool ClusterMapObjectController.addIconMapObject | ( | IconMapObject | iconMapObject | ) |
Adds an icon map object to the cluster controller.
| iconMapObject | Icon to cluster IconMapObject. Must be added to the same LocationWindow via addIconMapObject. |
Dart code snippet:
| void ClusterMapObjectController.addListener | ( | ClusterMapObjectControllerListener | listener | ) |
Adds a listener for cluster lifecycle events ClusterMapObjectControllerListener.
| listener | Listener instance. |
Dart code snippet:
| void ClusterMapObjectController.clear | ( | ) |
Removes all icon map objects from the controller and destroys visible cluster markers.
Dart code snippet:
| List< ClusterMapObject > ClusterMapObjectController.getClusters | ( | ) |
Returns a snapshot of currently visible clusters.
Dart code snippet:
| double ClusterMapObjectController.getRadius | ( | ) |
Returns cluster radius in density-independent pixels.
Dart code snippet:
| bool ClusterMapObjectController.isEnabled | ( | ) |
Returns whether clustering is enabled.
Dart code snippet:
| bool ClusterMapObjectController.removeIconMapObject | ( | IconMapObject | iconMapObject | ) |
Removes an icon map object from the cluster controller.
| iconMapObject | Icon to remove. |
Dart code snippet:
| void ClusterMapObjectController.removeListener | ( | ClusterMapObjectControllerListener | listener | ) |
Removes a previously added listener.
| listener | Listener instance to remove. |
Dart code snippet:
| bool ClusterMapObjectController.setClusterSize | ( | double | width, |
| double | height ) |
Specifies the size of the default cluster icon in pixels.
Dart code snippet:
| void ClusterMapObjectController.setEnabled | ( | bool | enabled | ) |
Enables or disables clustering. Default: true.
Dart code snippet:
| bool ClusterMapObjectController.setInteractive | ( | bool | interactive | ) |
Specifies whether cluster markers can be picked. Default: true.
Dart code snippet:
| void ClusterMapObjectController.setRadius | ( | double | radius | ) |
Cluster radius in density-independent pixels. Default: 40.
Dart code snippet: