mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-02 00:32:09 +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
|
### Adding and removing Markers
|
||||||
addLayer, removeLayer and clearLayers are supported and they should work for most uses.
|
addLayer, removeLayer and clearLayers are supported and they should work for most uses.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user