Update readme for getVisibleParent

This commit is contained in:
danzel
2013-06-21 15:18:18 +12:00
parent 9d9fde91aa
commit fb395732b6
+7
View File
@@ -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.