Skip to content

Commit

Permalink
min level set
Browse files Browse the repository at this point in the history
  • Loading branch information
okwme committed Mar 14, 2016
1 parent 880e852 commit 0f8b4e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/jquery.mapael.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@
* Zoom on the map at a specific level focused on specific coordinates
* If no coordinates are specified, the zoom will be focused on the center of the map
* options :
* "level" : level of the zoom between 0 and maxLevel
* "level" : level of the zoom between minLevel and maxLevel
* "x" or "latitude" : x coordinate or latitude of the point to focus on
* "y" or "longitude" : y coordinate or longitude of the point to focus on
* "fixedCenter" : set to true in order to preserve the position of x,y in the canvas when zoomed
Expand Down Expand Up @@ -641,7 +641,7 @@
}
}
// Make sure we stay in the boundaries
newLevel = Math.min(Math.max(newLevel, 0), self.options.map.zoom.maxLevel);
newLevel = Math.min(Math.max(newLevel, self.options.map.zoom.minLevel), self.options.map.zoom.maxLevel);
}

zoomLevel = (1 + newLevel * self.options.map.zoom.step);
Expand Down Expand Up @@ -2045,6 +2045,7 @@
},
zoom: {
enabled: false,
minLevel: 0,
maxLevel: 10,
step: 0.25,
mousewheel: true,
Expand Down

0 comments on commit 0f8b4e8

Please sign in to comment.