diff --git a/cypress/e2e/map.cy.ts b/cypress/e2e/map.cy.ts index f99d36c..012772e 100644 --- a/cypress/e2e/map.cy.ts +++ b/cypress/e2e/map.cy.ts @@ -42,6 +42,14 @@ describe("Map", () => { cy.url().should("contain", "zoom=11"); }); + it("zooms the map in with scroll wheel and attempts to surpass the max zoom", () => { + loadMap("/?zoom=18"); + + cy.get(".leaflet-container").scrollLeaflet({ deltaY: -66.666666 }); + + cy.url().should("contain", "zoom=18"); + }); + it("unzooms the map with zoom out button and changes URL", () => { loadMap("/?zoom=10"); diff --git a/src/components/MainMap.vue b/src/components/MainMap.vue index 7daaa51..45ffda3 100644 --- a/src/components/MainMap.vue +++ b/src/components/MainMap.vue @@ -229,7 +229,7 @@ onBeforeUnmount(() => mapStore.clearLayerData()); ref="map" :zoom="mapStore.zoom" :minZoom="7" - :maxZoom="20" + :maxZoom="18" :center="mapStore.locationArray" :options="{ attributionControl: false,