let map = null; function initializeMap(mapImgUrl) { map = L.map('map', { minZoom: 0, maxZoom: 4, crs: L.CRS.Simple }); L.imageOverlay(mapImgUrl, [[-180, 180],[180, -180]]).addTo(map); map.setMaxBounds([[-180,180],[180,-180]]); map.setView([0,0], 2); }