Reveal Marker in Leaflet.markercluster

254 Views Asked by At

Is it somehow possible to reveal a Leaflet marker inside a Markercluster without user-interaction?

For now i'm using the panTo Method (http://leafletjs.com/reference.html#map-panto) for centering a rendered marker. But if the marker is inside a cluster the map does not zoom in until that specific marker gets revealed.

map.panTo(L.latLng(47.4612, 8.9123123));
1

There are 1 best solutions below

0
On

you can remove it from the cluster and add it to the map...

cluster.removeLayer(theMarker);

map.addLayer(theMarker);