File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,11 @@ describe('mapboxgl_WebMapV2', () => {
202
202
getZoom : ( ) => {
203
203
return 2 ;
204
204
} ,
205
+ getMaxZoom : ( ) => {
206
+ return 22 ;
207
+ } ,
205
208
setZoom : jasmine . createSpy ( 'setZoom' ) . and . callFake ( ( ) => { } ) ,
209
+ setMaxZoom : jasmine . createSpy ( 'setZoom' ) . and . callFake ( ( ) => { } ) ,
206
210
setCRS : jasmine . createSpy ( 'setCRS' ) . and . callFake ( ( ) => { } ) ,
207
211
getCenter : ( ) => {
208
212
return {
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ const Map = function (options) {
31
31
this . _sources = { } ;
32
32
this . _collectResourceTiming = ! ! this . options . collectResourceTiming ;
33
33
this . zoom = this . options . zoom || 0 ;
34
+ this . maxZoom = this . options . maxZoom || 22 ;
34
35
this . _container = this . options . container || 'map' ;
35
36
this . _layers = { } ;
36
37
this . _layersList = [ ] ;
@@ -94,7 +95,7 @@ const Map = function (options) {
94
95
// Settings
95
96
'setMaxBounds' ,
96
97
'setMinZoom' ,
97
- 'setMaxZoom' ,
98
+ // 'setMaxZoom',
98
99
// Layer properties
99
100
'setLayoutProperty' ,
100
101
'setPaintProperty'
@@ -129,6 +130,12 @@ const Map = function (options) {
129
130
layers : this . _layersList
130
131
} ;
131
132
} ;
133
+ this . getMaxZoom = function ( ) {
134
+ return this . maxZoom ;
135
+ } ;
136
+ this . setMaxZoom = function ( zoom ) {
137
+ this . maxZoom = zoom ;
138
+ } ;
132
139
133
140
this . getContainer = function ( ) {
134
141
const container = {
@@ -278,9 +285,6 @@ const Map = function (options) {
278
285
this . getMinZoom = function ( ) {
279
286
return 0 ;
280
287
} ;
281
- this . getMaxZoom = function ( ) {
282
- return 22 ;
283
- } ;
284
288
this . doubleClickZoom = {
285
289
disable : function ( ) { } ,
286
290
enable : function ( ) { }
You can’t perform that action at this time.
0 commit comments