iotmapmanager
Version:
Manage markers, clusters, user marker or paths on IotMaps
56 lines (55 loc) • 2.22 kB
TypeScript
import { IotMapConfig } from './iot-map-config';
import { IotCluster } from './iot-map-types';
import { IotMapCluster } from './iot-map-cluster';
import { IotMapManager } from './iot-map-manager';
/**
* Class IotMapClusterManager to manage manual clusters
*/
export declare class IotMapClusterManager {
clustersObjects: IotMapCluster[];
config: IotMapConfig;
map: IotMapManager;
/**
* Constructor of manual cluster manager
* @param map - map manager to display in
* @param config - config to use to display manual cluster
*/
constructor(map: IotMapManager, config: IotMapConfig);
/**
* Insert manual cluster in the map
* @param cluster - structure containing all cluster information
*/
addCluster(cluster: IotCluster): void;
/**
* Insert a list of manual clusters in the map
* @param clusterList - list of structures containing manual clusters information
*/
addClusters(clusterList: IotCluster[]): void;
/**
* Remove a manual cluster from the map
* @param clusterId - id of the cluster to remove
*/
removeCluster(clusterId: string): void;
/**
* Remove a list of manual clusters from the map
* @param clustersId - list of ids of manual clusters to remove
*/
removeClusters(clustersId: string[]): void;
/**
* Update a manual cluster with new display parameters
* @param clusterId - id of the cluster to update
* @param params - structure containing cluster information to update
*/
updateCluster(clusterId: string, params: Partial<IotCluster>): void;
/**
* Update all manual clusters with new display parameters
* @param clusterList - the list of manual clusters to display
*
* @remarks the manual clusters list is exhaustive: if a cluster is not previously displayed but appears in
* clusterList, it will be added / if a cluster is previously displayed but doesn't appear in clusterList, it will be
* removed / if a cluster is previously displayed and appears in clusterList, it will be updated
*/
updateAllClusters(clusterList: IotCluster[]): void;
getAllClusters(): IotMapCluster[];
redrawAll(): void;
}