Leaflet map United States and fitBounds
问题 I've created a function which adds a few layers to my Leaflet map on page load. Afterwards, I want it to center the view based up on these layers. let layerGroup = L.featureGroup(); ... // add multiple layers layerGroup.addLayer(L.geoJson(feature)) ... leafletMap.addLayer(layerGroup); leafletMap.fitBounds(layerGroup.getBounds()); It currently works as intended, and the map zooms in in order to fit the bounds. However, when the United States is one of these layers, the map completely zooms out