X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/9eb0491f622ce7cf3cc804f63c25e70e951d152b..fe6e7efceb1429fb2c32616895e675131acf476d:/src/components/Map.svelte diff --git a/src/components/Map.svelte b/src/components/Map.svelte index 763495d..5426864 100644 --- a/src/components/Map.svelte +++ b/src/components/Map.svelte @@ -17,8 +17,9 @@ function createMap(container) { const attribution = Nominatim_Config.Map_Tile_Attribution; + let map = new L.map(container, { - attributionControl: (attribution && attribution.length), + attributionControl: false, scrollWheelZoom: true, // !L.Browser.touch, touchZoom: false, center: [ @@ -28,6 +29,10 @@ zoom: Nominatim_Config.Map_Default_Zoom }); + if (attribution && attribution.length) { + L.control.attribution({ prefix: 'Leaflet' }).addTo(map); + } + L.tileLayer(Nominatim_Config.Map_Tile_URL, { attribution: attribution }).addTo(map);