Groups IconMapObject instances into clusters depending on zoom and proximity. More...
#include <com/navigine/idl/objc/NCClusterMapObjectController.h>
Inherits NSObject.
Instance Methods | |
| (BOOL) | - addIconMapObject: |
| Adds an icon map object to the cluster controller. | |
| (BOOL) | - removeIconMapObject: |
| 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: |
| Enables or disables clustering. Default: true. | |
| (BOOL) | - isEnabled |
| Returns whether clustering is enabled. | |
| (void) | - setRadius: |
| Cluster radius in density-independent pixels. Default: 40. | |
| (float) | - getRadius |
| Returns cluster radius in density-independent pixels. | |
| (BOOL) | - setInteractive: |
| Specifies whether cluster markers can be picked. Default: true. | |
| (BOOL) | - setClusterSize:height: |
| Specifies the size of the default cluster icon in pixels. | |
| (void) | - addListener: |
| Adds a listener for cluster lifecycle events ClusterMapObjectControllerListener. | |
| (void) | - removeListener: |
| Removes a previously added listener. | |
| (nonnull NSArray< NCClusterMapObject * > *) | - 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 26 of file NCClusterMapObjectController.h.
| - (BOOL) addIconMapObject: | (nullable NCIconMapObject *) | iconMapObject |
Adds an icon map object to the cluster controller.
| iconMapObject | Icon to cluster IconMapObject. Must be added to the same LocationWindow via addIconMapObject. |
Swift code snippet:
Objective C code snippet:
| - (void) addListener: | (nullable id< NCClusterMapObjectControllerListener >) | listener |
Adds a listener for cluster lifecycle events ClusterMapObjectControllerListener.
| listener | Listener instance. |
Swift code snippet:
Objective C code snippet:
| - (void) clear |
Removes all icon map objects from the controller and destroys visible cluster markers.
Swift code snippet:
Objective C code snippet:
| - (nonnull NSArray< NCClusterMapObject * > *) getClusters |
Returns a snapshot of currently visible clusters.
Swift code snippet:
Objective C code snippet:
| - (float) getRadius |
Returns cluster radius in density-independent pixels.
Swift code snippet:
Objective C code snippet:
| - (BOOL) isEnabled |
Returns whether clustering is enabled.
Swift code snippet:
Objective C code snippet:
| - (BOOL) removeIconMapObject: | (nullable NCIconMapObject *) | iconMapObject |
Removes an icon map object from the cluster controller.
| iconMapObject | Icon to remove. |
Swift code snippet:
Objective C code snippet:
| - (void) removeListener: | (nullable id< NCClusterMapObjectControllerListener >) | listener |
Removes a previously added listener.
| listener | Listener instance to remove. |
Swift code snippet:
Objective C code snippet:
| - (BOOL) setClusterSize: | (float) | width | |
| height: | (float) | height |
Specifies the size of the default cluster icon in pixels.
Swift code snippet:
Objective C code snippet:
| - (void) setEnabled: | (BOOL) | enabled |
Enables or disables clustering. Default: true.
Swift code snippet:
Objective C code snippet:
| - (BOOL) setInteractive: | (BOOL) | interactive |
Specifies whether cluster markers can be picked. Default: true.
Swift code snippet:
Objective C code snippet:
| - (void) setRadius: | (float) | radius |
Cluster radius in density-independent pixels. Default: 40.
Swift code snippet:
Objective C code snippet: