diff --git a/README.md b/README.md index b26c45b7e..2dfee6d2c 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,13 @@ markers.on('clusterclick', function (a) { }); ``` +### Getting the visible parent of a marker +If you have a marker in your MarkerClusterGroup and you want to get the visible parent of it (Either itself or a cluster it is contained in that is currently visible on the map). +``` +var visibleOne = markerClusterGroup.getVisibleParent(myMarker); +console.log(visibleOne.getLatLng()); +``` + ### Adding and removing Markers addLayer, removeLayer and clearLayers are supported and they should work for most uses.