X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5f2a5cadcb693b34b81a9232b8879c3b4f12843d..de0bf2549978f0b517c06c3eadaa477b37433ea6:/app/assets/javascripts/leaflet.share.js diff --git a/app/assets/javascripts/leaflet.share.js b/app/assets/javascripts/leaflet.share.js index 40ba020e6..f0d278109 100644 --- a/app/assets/javascripts/leaflet.share.js +++ b/app/assets/javascripts/leaflet.share.js @@ -410,15 +410,15 @@ L.OSM.share = function (options) { $("#mapnik_image_width").text(mapWidth); $("#mapnik_image_height").text(mapHeight); - const layer = map.getMapBaseLayerId(); + const layerId = map.getMapBaseLayerId(); const layerKeys = new Map([ ["mapnik", "standard"], ["cyclemap", "cycle_map"], ["transportmap", "transport_map"] ]); - $("#mapnik_image_layer").text(layerKeys.has(layer) ? I18n.t(`javascripts.map.base.${layerKeys.get(layer)}`) : ""); - $("#map_format").val(layer); + $("#mapnik_image_layer").text(layerKeys.has(layerId) ? I18n.t(`javascripts.map.base.${layerKeys.get(layerId)}`) : ""); + $("#map_format").val(layerId); $("#map_zoom").val(map.getZoom()); $("#mapnik_lon").val(map.getCenter().lng);