X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/da196b93dcd704e2150e691e2dc588952015b50d..2a34127a122a0d415a1cabb8de8e80a91b3dc017:/src/components/Map.svelte

diff --git a/src/components/Map.svelte b/src/components/Map.svelte
index 763495d..dd2a1ae 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: [
@@ -27,6 +28,14 @@
       ],
       zoom: Nominatim_Config.Map_Default_Zoom
     });
+    if (typeof Nominatim_Config.Map_Default_Bounds !== 'undefined'
+      && Nominatim_Config.Map_Default_Bounds) {
+      map.fitBounds(Nominatim_Config.Map_Default_Bounds);
+    }
+
+    if (attribution && attribution.length) {
+      L.control.attribution({ prefix: '<a href="https://leafletjs.com/">Leaflet</a>' }).addTo(map);
+    }
 
     L.tileLayer(Nominatim_Config.Map_Tile_URL, {
       attribution: attribution
