]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index.js
Start to refactor updatelinks
[rails.git] / app / assets / javascripts / index.js
index 2cabfc5d0369105b5152b9650923c127c1e2c2dc..e4dbb84d02b141d0ff15eee918f040b96c09a292 100644 (file)
@@ -19,10 +19,6 @@ $(document).ready(function () {
 
   layers = mapLayers();
 
 
   layers = mapLayers();
 
-  for (var i = 0; i < layers.length; i++) {
-    layers[i].layer = new (layers[i].klass)(layers[i]);
-  }
-
   layers[0].layer.addTo(map);
 
   $("#map").on("resized", function () {
   layers[0].layer.addTo(map);
 
   $("#map").on("resized", function () {
@@ -118,8 +114,7 @@ $(document).ready(function () {
     var layers = getMapLayers();
     var extents = map.getBounds().wrap();
 
     var layers = getMapLayers();
     var extents = map.getBounds().wrap();
 
-    updatelinks(center.lng,
-                center.lat,
+    updatelinks(center,
                 zoom,
                 layers,
                 extents.getWest(),
                 zoom,
                 layers,
                 extents.getWest(),