X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ce53e510adb1baed6cc8f27e48d810a586853e55..1a5f14d338b1e809947232e0dc0a59040f265395:/app/assets/javascripts/osm.js.erb?ds=sidebyside diff --git a/app/assets/javascripts/osm.js.erb b/app/assets/javascripts/osm.js.erb index 4bfc5cad1..5343b039c 100644 --- a/app/assets/javascripts/osm.js.erb +++ b/app/assets/javascripts/osm.js.erb @@ -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); } };