@@ -32,6 +32,10 @@ function onMapPropertyChanged(mapView: MapViewBase) {
3232 if ( ! mapView . processingCameraEvent ) mapView . updateCamera ( ) ;
3333}
3434
35+ function onSetMinZoomMaxZoom ( mapView : MapViewBase ) {
36+ mapView . setMinZoomMaxZoom ( ) ;
37+ }
38+
3539function onPaddingPropertyChanged ( mapView : MapViewBase ) {
3640 mapView . updatePadding ( ) ;
3741}
@@ -144,6 +148,8 @@ export abstract class MapViewBase extends View implements MapView {
144148 public longitude : number ;
145149 public bearing : number ;
146150 public zoom : number ;
151+ public minZoom : number ;
152+ public maxZoom : number ;
147153 public tilt : number ;
148154 public padding : number [ ] ;
149155 public mapAnimationsEnabled : boolean ;
@@ -259,6 +265,8 @@ export abstract class MapViewBase extends View implements MapView {
259265
260266 public abstract updatePadding ( ) : void ;
261267
268+ public abstract setMinZoomMaxZoom ( ) : void ;
269+
262270 public abstract addMarker ( ...markers : Marker [ ] ) : void ;
263271
264272 public abstract removeMarker ( ...markers : Marker [ ] ) : void ;
@@ -360,6 +368,12 @@ bearingProperty.register(MapViewBase);
360368export const zoomProperty = new Property < MapViewBase , number > ( { name : 'zoom' , defaultValue : 0 , valueChanged : onMapPropertyChanged } ) ;
361369zoomProperty . register ( MapViewBase ) ;
362370
371+ export const minZoomProperty = new Property < MapViewBase , number > ( { name : 'minZoom' , defaultValue : 0 , valueChanged : onSetMinZoomMaxZoom } ) ;
372+ minZoomProperty . register ( MapViewBase ) ;
373+
374+ export const maxZoomProperty = new Property < MapViewBase , number > ( { name : 'maxZoom' , defaultValue : 22 , valueChanged : onSetMinZoomMaxZoom } ) ;
375+ maxZoomProperty . register ( MapViewBase ) ;
376+
363377export const tiltProperty = new Property < MapViewBase , number > ( { name : 'tilt' , defaultValue : 0 , valueChanged : onMapPropertyChanged } ) ;
364378tiltProperty . register ( MapViewBase ) ;
365379
0 commit comments