]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index.js
Even more map ui js refactor
[rails.git] / app / assets / javascripts / index.js
index ba2aa26444ab8cc065537d124bd76fb8a4b44e4e..48207c43dfe78e56ca573bf18bd12a641c14f4b3 100644 (file)
@@ -12,13 +12,13 @@ $(document).ready(function () {
   var params = OSM.mapParams();
 
   map = L.map("map", {
-    attributionControl: false,
     zoomControl: false,
     layerControl: false
   });
 
-  layers = mapLayers();
+  map.attributionControl.setPrefix('');
 
+  layers = mapLayers();
   layers[0].layer.addTo(map);
 
   $("#map").on("resized", function () {
@@ -114,15 +114,7 @@ $(document).ready(function () {
     var layers = getMapLayers();
     var extents = map.getBounds().wrap();
 
-    updatelinks(center.lng,
-                center.lat,
-                zoom,
-                layers,
-                extents.getWest(),
-                extents.getSouth(),
-                extents.getEast(),
-                extents.getNorth(),
-                params.object);
+    updatelinks(center, zoom, layers, extents, params.object);
 
     var expiry = new Date();
     expiry.setYear(expiry.getFullYear() + 10);