如何在Leaflet中获得layerGroup的边界?


12

首先,将多个geoJSON图层添加到我的地图,方法是将它们添加到LayerGroup,然后将layerGroup添加到地图。

现在我想用所有图层的合并边界在地图上调用fitBounds,问题是layerGroup没有getBounds方法

我能做什么?

Answers:


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.