From 79bdb0ff86651446437f19aae107294cbd59558c Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Mon, 5 Aug 2013 13:10:37 +0200 Subject: [PATCH] Do not fit map to search result (object) twice When clicking on search results the respective osm object is loaded asynchronously and afterwards shown on the map. Some objects can take a few seconds to load however. If a user already panned/zoomed the map manually during this time then their actions are reverted because the map fits to the object again. There is actually no need for this behaviour, because a good geocoder already returns an appropriate bounding box for the search result. --- app/assets/javascripts/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 19e1f16de..15acc6412 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -195,7 +195,7 @@ function setPositionLink(map) { } if (data.type && data.id) { - addObjectToMap(data, map, { zoom: true, style: { opacity: 0.2, fill: false } }); + addObjectToMap(data, map, { zoom: false, style: { opacity: 0.2, fill: false } }); } map.markerLayer.clearLayers(); -- 2.43.2