Get center of geojson Continent/Country/State with leaflet
问题 Is there a way of finding a center for countries/continents which consist of more than one polygon object(ex. USA, Canada, which have an islands besides main land part)? I was trying to use leaflet's Layer.getCenter() or even Layer.getBounds().getCenter() , but those methods certainly don't work for this type of countries and return a "no-go" results. Example can be seen by the following link (leaflet playground). Just scroll and click on US or Canada and see where circleMarker will appear.