X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9bf18a360e995b359a1d9f8ea2000bcf3b227625..2a9286a16a0ca0e6aa025b13771d3118040b9d60:/app/assets/javascripts/index.js?ds=sidebyside diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 9aed3c3f7..0e3e7cd56 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -21,9 +21,19 @@ $(document).ready(function () { OSM.mapUI().addTo(map); + L.control.share({ + getUrl: function(map) { + return setArgs('http://osm.org/', { + lon: map.getCenter().lng, + lat: map.getCenter().lat + }); + } + }).addTo(map); + L.control.locate({ position: 'topright' }).addTo(map); + L.control.scale().addTo(map); map.attributionControl.setPrefix(permalinks);