add maxZoom to Map fitBounds options, close #2101
This commit is contained in:
parent
394f913434
commit
c3734e5a91
@ -103,6 +103,8 @@ L.Map = L.Class.extend({
|
||||
nePoint = this.project(bounds.getNorthEast(), zoom),
|
||||
center = this.unproject(swPoint.add(nePoint).divideBy(2).add(paddingOffset), zoom);
|
||||
|
||||
zoom = options && options.maxZoom ? Math.min(options.maxZoom, zoom) : zoom;
|
||||
|
||||
return this.setView(center, zoom, options);
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user