X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/cf3c627c1ab7c64c219acc8ecff526f21db0c5e1..73ea36e13ac0f3ac00080b3995ecc7ab71cdbbe2:/app/assets/javascripts/leaflet.map.js diff --git a/app/assets/javascripts/leaflet.map.js b/app/assets/javascripts/leaflet.map.js index 6adf2138d..c63c4a281 100644 --- a/app/assets/javascripts/leaflet.map.js +++ b/app/assets/javascripts/leaflet.map.js @@ -16,8 +16,6 @@ L.OSM.Map = L.Map.extend({ this.baseLayers = []; for (const layerDefinition of OSM.LAYER_DEFINITIONS) { - if (layerDefinition.apiKeyId && !OSM[layerDefinition.apiKeyId]) continue; - let layerConstructor = L.OSM.TileLayer; const layerOptions = {}; @@ -26,8 +24,6 @@ L.OSM.Map = L.Map.extend({ layerOptions.attribution = makeAttribution(value); } else if (property === "nameId") { layerOptions.name = I18n.t(`javascripts.map.base.${value}`); - } else if (property === "apiKeyId") { - layerOptions.apikey = OSM[value]; } else if (property === "leafletOsmId") { layerConstructor = L.OSM[value]; } else if (property === "leafletOsmDarkId" && OSM.isDarkMap() && L.OSM[value]) { @@ -47,7 +43,7 @@ L.OSM.Map = L.Map.extend({ this.noteLayer = new L.FeatureGroup(); this.noteLayer.options = { code: "N" }; - this.dataLayer = new L.OSM.DataLayer(null); + this.dataLayer = new L.OSM.DataLayer(null, { asynchronous: true }); this.dataLayer.options.code = "D"; this.gpsLayer = new L.OSM.GPS({