I have a Leaflet map that uses the Leaflet.markercluster plugin.
The clusters plot properly on the map but I am noticing that the clusters that are outside the view are still rendering even though I have the removeOutsideVisibleBounds
option set to true
.
The way I can tell is if I pan the map by pressing and holding the mouse button, all of the clusters are still visible as I pan.
The configuration for the cluster group is below:
let myCluster = L.markerClusterGroup({ spiderfyOnMaxZoom: false, removeOutsideVisibleBounds: true });
What else am I missing to ensure that the clusters that are outside of the view are removed?
The project is in Angular 5 using ngx-leaflet.