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: [
],
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