]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index.js
Prevent click propagation on ui panes
[rails.git] / app / assets / javascripts / index.js
index 9aed3c3f7ebad396a506c6219e520811159be577..0e3e7cd563f433e84150451b61269409f50b29ee 100644 (file)
@@ -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);