From fdda5bf1bd3de18efb39a51bdda78c0aa83d3154 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Tue, 3 Jun 2014 13:45:41 +0100 Subject: [PATCH] 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 --- code/geosearch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/geosearch.js b/code/geosearch.js index 8735cb52..c4caabf0 100644 --- a/code/geosearch.js +++ b/code/geosearch.js @@ -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'); }); }