X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4563244fd1cb43dca00b427e1f13ac890b7f00a0..b9a19ab23a8dc63bc7c7f867e2ece6924319f0f2:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 2cabfc5d0..3edfaeeaf 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -12,17 +12,13 @@ $(document).ready(function () { var params = OSM.mapParams(); map = L.map("map", { - attributionControl: false, zoomControl: false, layerControl: false }); - layers = mapLayers(); - - for (var i = 0; i < layers.length; i++) { - layers[i].layer = new (layers[i].klass)(layers[i]); - } + map.attributionControl.setPrefix(''); + layers = mapLayers(); layers[0].layer.addTo(map); $("#map").on("resized", function () { @@ -118,8 +114,7 @@ $(document).ready(function () { var layers = getMapLayers(); var extents = map.getBounds().wrap(); - updatelinks(center.lng, - center.lat, + updatelinks(center, zoom, layers, extents.getWest(),