X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4563244fd1cb43dca00b427e1f13ac890b7f00a0..7bcea3839da07f01258157ad204cd5b1fd4c76d8:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 2cabfc5d0..48207c43d 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,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);