Browse Source

map: disable clustering when map is at maximum zoom level

Baptiste Jonglez 7 years ago
parent
commit
8d74281c76

+ 2 - 1
panorama/templates/panorama/locate_point.html

@@ -80,7 +80,8 @@ style="padding:0px;height:calc(100vh - 50px)"
     var markerClusters = L.markerClusterGroup({
     spiderfyOnMaxZoom: false,
     showCoverageOnHover: false,
-    maxClusterRadius: 20
+    maxClusterRadius: 20,
+    disableClusteringAtZoom: 19
     });
     var allMarkers = [[{{ located_point_lat }}, {{ located_point_lon }}]];
     // Legend

+ 2 - 1
panorama/templates/panorama/main.html

@@ -80,7 +80,8 @@
         var markerClusters = L.markerClusterGroup({
             spiderfyOnMaxZoom: false,
             showCoverageOnHover: false,
-            maxClusterRadius: 20
+            maxClusterRadius: 20,
+            disableClusteringAtZoom: 19
         });
         var crosshairIcon = L.icon({
             iconUrl: '{% static "panorama/img/marker-blue.png" %}',