diff --git a/app/javascript/controllers/non_geo_controller.js b/app/javascript/controllers/non_geo_controller.js index 1da5511a..419e3c6a 100644 --- a/app/javascript/controllers/non_geo_controller.js +++ b/app/javascript/controllers/non_geo_controller.js @@ -72,11 +72,14 @@ export default class extends Controller { get map () { if (!this._map) { this._map = L.map(this.mapTarget, { + minZoom: -5, crs: L.CRS.Simple, zoomSnap: 0.1 }).setView(this.coords, 13); - L.svgOverlay(this.svgOverlay, this.bounds).addTo(this._map); + const bounds = this.bounds; + + L.svgOverlay(this.svgOverlay, bounds).addTo(this._map); this._map.fitBounds(bounds); this._map.setMaxBounds(bounds);