Skip to content

Commit

Permalink
prevent panning outside original map boundaries
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaLRussell committed Feb 3, 2025
1 parent e052f46 commit 655e376
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion static/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ <h1>GROUT Test Page</h1>
</div>
</div>
<script>
const map = L.map("map").setView({lon: 0, lat: 0}, 3);
const map = L.map("map", {
maxBoundsViscosity: 1.0 // prevent any dragging outside max bounds
}).setView({ lon: 0, lat: 0 }, 3);
map.options.minZoom = 3;
map.setMaxBounds(map.getBounds());


//const nameProp = "NAME_1";
const groutServers = {
Expand Down

0 comments on commit 655e376

Please sign in to comment.