limit zoom on search to the level that shows all portals - prevents being zoomed in too far since changing most map layers to suppot zoom 21

This commit is contained in:
Jon Atkins 2014-06-03 13:45:41 +01:00
parent 361c665626
commit fdda5bf1bd

View File

@ -32,7 +32,7 @@ window.search = function(search) {
var southWest = new L.LatLng(b[0], b[2]),
northEast = new L.LatLng(b[1], b[3]),
bounds = new L.LatLngBounds(southWest, northEast);
window.map.fitBounds(bounds);
window.map.fitBounds(bounds, {maxZoom: 17});
if(window.isSmartphone()) window.show('map');
});
}