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, because of the Near islands.
Is there a way to fix this issue, and thus zoom in on the United States without the map zooming out?
Thanks in advance