issue #1871 fixed, set this._zoom on map init whenever options.zoom is provided

This commit is contained in:
AndreyGeonya 2014-08-11 15:14:37 +03:00
parent 6afc9eafd7
commit f7ac72d073

View File

@ -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});
} }