Leaflet.js center the map on a group of markers
You can use L.LatLngBounds in order to create an area to zoom to. First, create a bounds and pass it an array of L.LatLngs: var bounds = new L.LatLngBounds(arrayOfLatLngs); This will create a bounds that will encapsulate every point that is contained in the array. Once you have the bounds, you can fit the bounds … Read more