From fb395732b6491c7b0786e667a7f77e5d27eec87a Mon Sep 17 00:00:00 2001 From: danzel Date: Fri, 21 Jun 2013 15:18:18 +1200 Subject: [PATCH] Update readme for getVisibleParent --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) 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.