I'm using ngx-leaflet v4.0.0 and Angular v6.1.10.
I have a map with several basemaps and a few custom overlays. I'm using the LayersControl from ngx-leaflet.
How can a user easily zoom to the bounds of a specific overlay layer? I know I can do it like this:
zoomToHome() {
this.map.flyToBounds(this.homeLayer.getBounds());
this.map.fitBounds(this.homeLayer.getBounds());
}
This is the click function of my custom button. And when adding my layers I save one as my home layer.
I would prefer to have a button in the layer control in front of each layer, when clicked the map goes to its bounds.
Can this be done with the current layers control or should I submit a feature request with Asymmetrik
?