Zoom para adaptarse a todos los marcadores en Mapbox o Leaflet
¿Cómo configuro la vista para ver todos los marcadores en el mapa enMapbox oFolleto? Como la API de Google Maps lo hace conbounds
?
P.ej:
var latlngbounds = new google.maps.LatLngBounds();
for (var i = 0; i < latlng.length; i++) {
latlngbounds.extend(latlng[i]);
}
map.fitBounds(latlngbounds);