[Pkg-javascript-commits] [leaflet-markercluster] 377/479: Update readme for getVisibleParent

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:00:59 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet-markercluster.

commit fb395732b6491c7b0786e667a7f77e5d27eec87a
Author: danzel <danzel at localhost.geek.nz>
Date:   Fri Jun 21 15:18:18 2013 +1200

    Update readme for getVisibleParent
---
 README.md | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/README.md b/README.md
index b26c45b..2dfee6d 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.
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet-markercluster.git



More information about the Pkg-javascript-commits mailing list