]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/note.js.erb
Restore marker for non-browse search results
[rails.git] / app / assets / javascripts / index / note.js.erb
index 1f9dbe37538313ccbf0ef30b229cd6ecdad4cc9a..2a2599a3ca3140267b0453e018c3617814686e65 100644 (file)
@@ -64,9 +64,9 @@ OSM.Note = function (map) {
     var data = $('.details').data(),
       latLng = data.coordinates.split(',');
 
-    if (!window.location.hash) {
-      OSM.route.moveListenerOff();
-      map.once('moveend', OSM.route.moveListenerOn);
+    if (!window.location.hash || window.location.hash.match(/^#?c[0-9]+$/)) {
+      OSM.router.moveListenerOff();
+      map.once('moveend', OSM.router.moveListenerOn);
       map.getZoom() > 15 ? map.panTo(latLng) : map.setView(latLng, 16);
     }