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.
This commit is contained in:
parent
b8f126bcf6
commit
79bdb0ff86
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue