diff --git a/src/iotMapManager/src/iot-map-cluster-manager.ts b/src/iotMapManager/src/iot-map-cluster-manager.ts index 9c96b01b..8a95764c 100644 --- a/src/iotMapManager/src/iot-map-cluster-manager.ts +++ b/src/iotMapManager/src/iot-map-cluster-manager.ts @@ -142,6 +142,10 @@ export class IotMapClusterManager { currentClusterInfos.aggregation = params.aggregation htmlModificationNeeded = true } + // Update cluster zoom + if (params.markersArea !== undefined) { + currentClusterInfos.markersArea = params.markersArea + } // update cluster icon if (htmlModificationNeeded) { diff --git a/src/map/map.component.ts b/src/map/map.component.ts index da1d0b3d..28ce3183 100644 --- a/src/map/map.component.ts +++ b/src/map/map.component.ts @@ -336,7 +336,8 @@ export class MapComponent implements AfterViewInit { lat: 44.882, lng: 4.895 }, - markersArea: new LatLngBounds([44.880, 4.89], [44.885, 4.9]), + // markersArea: new LatLngBounds([44.880, 4.89], [44.885, 4.9]), + markersArea: new LatLngBounds([0,0], [1,1]), contentLabel: 'interfaces', colNumber: 2, childCount: 4860, @@ -676,8 +677,11 @@ export class MapComponent implements AfterViewInit { this.iotMapClusterManager.addClusters(this.clustersList) this.iotMapUserMarkerManager.addUserMarker(this.userMarker) this.iotMapPathManager.addPath(this.chemin) + // Do the same when you want to override the zoom on a clicked cluster + this.iotMapClusterManager.updateCluster('cluster 1', { markersArea: new LatLngBounds([44.880, 4.89], [44.885, 4.9])}) this.iotMapAreaManager.addArea(this.zone) + } }