mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 08:02:51 +02:00
Update readme for getVisibleParent
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user