You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
so markerCluster seems to not have included a new update that spiderfys if the zoom is unecessary. There's a nice pull request in the markercluster repo that makes sure zoom is necessary and if it isn't spiderfy occurs. Leaflet/Leaflet.markercluster#415
This needs to be updated in the source code for markercluster since it's not in their distribution version yet.
Here's the code to replace the _zoomOrSpiderfy function with:
_zoomOrSpiderfy: function(e){varmap=this._map;if(e.layer._bounds._northEast.equals(e.layer._bounds._southWest)){if(this.options.spiderfyOnMaxZoom){e.layer.spiderfy();}}elseif(map.getMaxZoom()===map.getZoom()){if(this.options.spiderfyOnMaxZoom){e.layer.spiderfy();}}elseif(this.options.zoomToBoundsOnClick){e.layer.zoomToBounds();}// Focus the map again for keyboard users.if(e.originalEvent&&e.originalEvent.keyCode===13){map._container.focus();}},
right now there are some unnecessary zoom events with L.markerCluster() that can be fixed by maxZoom
The text was updated successfully, but these errors were encountered: