X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c878b5b8d4eea403ad5838fabcb5847517d130e2..104ba9c57ab55051988902dacc5e12a6b33554b2:/app/assets/javascripts/index/note.js.erb diff --git a/app/assets/javascripts/index/note.js.erb b/app/assets/javascripts/index/note.js.erb index 5022cfb80..09044bf0e 100644 --- a/app/assets/javascripts/index/note.js.erb +++ b/app/assets/javascripts/index/note.js.erb @@ -70,8 +70,11 @@ OSM.Note = function (map) { var data = $('.details').data(); if (!noteState) map.addLayer(noteLayer); - if (window.location.hash == "") { + if (!window.location.hash) { var coords = data.coordinates.split(','); + OSM.route.moveListenerOff(); + map.once('moveend', OSM.route.moveListenerOn); + map.getZoom() > 15 ? map.panTo(coords) : map.setView(coords, 16); }