getsmap / smap-responsive

A JavaScript framework for simple creation of web maps with responsive design supporting a range of different browsers and devices
GNU General Public License v3.0
14 stars 12 forks source link

LayerSwitcher zoom to extent of vector features #178

Closed johanlahti closed 9 years ago

johanlahti commented 9 years ago

Make it possible to set an option in LayerSwitcher to zoom to extent of features:

// L.Control.LayerSwitcher
options: {
    zoomToExtent: true
}

This should also be possible to specify for individual layers also:

// In layer config of any vector layer (as long as the layer supports method getBounds)
init: "L.GeoJSON.WFS",
options: {
    zoomToExtent: true
}