0

I am developing a Leaflet map where I specified three vector layers with addPolygons() and I allow the map user to switch between them using:

addLayersControl(
    baseGroups = c("layer_a", "layer_b", "layer_c"))

The three layers have different positions in space (geographical extent). I would like the Leaflet map to automatically move (i.e. zoom) to the central position of each layer when the users selects the corresponding radio button of each layers. Is this possible?

Jackk
  • 155
  • 5

0 Answers0