]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/osm.js.erb
Update hash on P2 and iD edit pages and throttle
[rails.git] / app / assets / javascripts / osm.js.erb
index 4bfc5cad150c971a47013164c93384d2e823dc53..5343b039cc8d6e82f3e4875a8e4cc1a3b06b398b 100644 (file)
@@ -130,5 +130,12 @@ OSM = {
     }
 
     return mapParams;
+  },
+
+  formatHash: function(args) {
+    var precision = zoomPrecision(args.zoom);
+    return '#' + args.zoom +
+           '/' + args.lat.toFixed(precision) +
+           '/' + args.lon.toFixed(precision);
   }
 };