let bounds = [ [0, 0], [847, 1280] ]; let map = L.map('map', { crs: L.CRS.Simple, maxZoom: 0, minZoom: -4, maxBounds: bounds }); let image = L.imageOverlay('http://kody.wig.pl/wp-content/uploads/factory_UML.png', bounds).addTo(map); map.fitBounds(bounds);
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.5.1/leaflet.css" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.5.1/leaflet.js"></script> <div id="map"></div>
html, body { height: 100%; margin: 0; } #map { width: 100%; height: 100%; }