mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Pass the right zoom level in so that clustering happens at the right scale
This commit is contained in:
@@ -134,7 +134,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
||||
|
||||
//If we have already clustered we'll need to add this one to a cluster
|
||||
|
||||
newCluster = this._topClusterLevel._recursivelyAddLayer(layer, this._topClusterLevel._zoom);
|
||||
newCluster = this._topClusterLevel._recursivelyAddLayer(layer, this._topClusterLevel._zoom - 1);
|
||||
|
||||
this._animationAddLayer(layer, newCluster);
|
||||
|
||||
@@ -210,7 +210,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
||||
|
||||
//otherwise, look through all of the markers we haven't managed to cluster and see if we should form a cluster with them
|
||||
if (!used) {
|
||||
var newCluster = this._clusterOne(unclustered, point, hasChildClusters);
|
||||
var newCluster = this._clusterOne(unclustered, point);
|
||||
if (newCluster) {
|
||||
newCluster._haveGeneratedChildClusters = hasChildClusters;
|
||||
newCluster._projCenter = this._map.project(newCluster.getLatLng(), zoom);
|
||||
|
||||
Reference in New Issue
Block a user