mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-23 16:13:33 +02:00
Add zoomToBounds to MarkerCluster. Fixes #6
This commit is contained in:
@@ -29,6 +29,11 @@ L.MarkerCluster = L.Marker.extend({
|
||||
return storageArray;
|
||||
},
|
||||
|
||||
//Zoom to the extents of this cluster
|
||||
zoomToBounds: function () {
|
||||
this._group._map.fitBounds(this._bounds);
|
||||
},
|
||||
|
||||
_baseInit: function () {
|
||||
L.Marker.prototype.initialize.call(this, this._latlng, { icon: this._group.options.iconCreateFunction(this._childCount) });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user