issue #1871 fixed, set this._zoom on map init whenever options.zoom is provided
This commit is contained in:
parent
6afc9eafd7
commit
f7ac72d073
@ -33,6 +33,10 @@ L.Map = L.Evented.extend({
|
|||||||
this.setMaxBounds(options.maxBounds);
|
this.setMaxBounds(options.maxBounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options.zoom !== undefined) {
|
||||||
|
this._zoom = options.zoom;
|
||||||
|
}
|
||||||
|
|
||||||
if (options.center && options.zoom !== undefined) {
|
if (options.center && options.zoom !== undefined) {
|
||||||
this.setView(L.latLng(options.center), options.zoom, {reset: true});
|
this.setView(L.latLng(options.center), options.zoom, {reset: true});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user