Closed tongwang closed 3 years ago
Hi there,
Is there a way to determine the geographical center of the shapefile and the area it covers so that we can set the view of the map optimally as opposed to hardcoding the view, as shown in all the demos? Thanks!
yes you can call getBounds() on the layer and then pass that to map.fitBounds()
map.fitBounds()
Hi there,
Is there a way to determine the geographical center of the shapefile and the area it covers so that we can set the view of the map optimally as opposed to hardcoding the view, as shown in all the demos? Thanks!