Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

leaflet limit map panning

var map = new L.Map('map', {
  maxBounds: bounds,
  //maxBoundsViscosity (value 0 to 1) controlls how much the map resists being dragged out of bounds
  maxBoundsViscosity: 1.0 
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #leaflet #limit #map #panning
ADD COMMENT
Topic
Name
1+9 =