@@ -1844,7 +1844,7 @@ export class Mapbox extends MapboxCommon implements MapboxApi {
18441844 return Promise . reject ( "'setOnFlingListener' is not supported on iOS" ) ;
18451845 }
18461846
1847- async setOnCameraMoveListener ( listener : ( ) => void , nativeMap ?: any ) : Promise < void > {
1847+ async setOnCameraMoveListener ( listener : ( reason , animated ? ) => void , nativeMap ?: any ) : Promise < void > {
18481848 const theMap : MGLMapView = nativeMap || this . _mapboxViewInstance ;
18491849 if ( theMap ) {
18501850 ( theMap . delegate as MGLMapViewDelegateImpl ) . setCameraChangedListener ( listener ) ;
@@ -2659,7 +2659,7 @@ class MGLMapViewDelegateImpl extends NSObject implements MGLMapViewDelegate {
26592659
26602660 private userLocationClickListener : ( annotation : MGLAnnotation ) => void ;
26612661 private userLocationChangedListener : ( location : UserLocation ) => void ;
2662- private cameraChangedListener : ( ) => void ;
2662+ private cameraChangedListener : ( reason , animated ?: boolean ) => void ;
26632663 private cameraIdledListener : ( ) => void ;
26642664 private userLocationRenderMode : any ;
26652665 private userLocationAnnotationView : CustomUserLocationAnnotationView ;
@@ -2933,18 +2933,21 @@ class MGLMapViewDelegateImpl extends NSObject implements MGLMapViewDelegate {
29332933 return null ;
29342934 }
29352935
2936- mapViewRegionIsChanging ( ) {
2936+ mapViewRegionIsChangingWithReason ( mapView : MGLMapView , reason : MGLCameraChangeReason ) {
29372937 if ( Trace . isEnabled ( ) ) {
29382938 CLog ( CLogTypes . info , 'MGLMapViewDelegateImpl::mapViewRegionIsChanging()' ) ;
29392939 }
29402940 if ( this . cameraChangedListener ) {
2941- this . cameraChangedListener ( ) ;
2941+ this . cameraChangedListener ( reason ) ;
29422942 }
29432943 }
2944- mapViewRegionDidChangeAnimated ( animated ) {
2944+ mapViewRegionDidChangeWithReasonAnimated ? ( mapView : MGLMapView , reason : MGLCameraChangeReason , animated : boolean ) {
29452945 if ( Trace . isEnabled ( ) ) {
29462946 CLog ( CLogTypes . info , 'MGLMapViewDelegateImpl::mapViewRegionDidChangeAnimated()' ) ;
29472947 }
2948+ if ( this . cameraChangedListener ) {
2949+ this . cameraChangedListener ( reason , animated ) ;
2950+ }
29482951 if ( this . cameraIdledListener ) {
29492952 this . cameraIdledListener ( ) ;
29502953 }
0 commit comments