From 198f3ec4eeac4485f3d5305295918514b6aeb4b3 Mon Sep 17 00:00:00 2001 From: wangcongtao Date: Mon, 4 Jan 2021 20:07:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=9C=B0=E5=9B=BEsdk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libraries/map-custom/build.gradle | 2 +- .../mogo/map/impl/custom/AMapViewWrapper.java | 21 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/libraries/map-custom/build.gradle b/libraries/map-custom/build.gradle index 7d2a5d509e..cbfaae21ac 100644 --- a/libraries/map-custom/build.gradle +++ b/libraries/map-custom/build.gradle @@ -67,7 +67,7 @@ dependencies { implementation project(':foudations:mogo-commons') } - implementation 'com.zhidaoauto.machine:map:1.0.0-vr-7.6.0' + implementation 'com.zhidaoauto.machine:map:1.0.0-vr-7.6.9' // implementation 'com.zhidaoauto.machine:map:1.0.0-vr-7.4.5-log-1' } diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java index f6c63fb767..f2d51a005a 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java @@ -305,13 +305,13 @@ public class AMapViewWrapper implements IMogoMapView, @Override public MapControlResult changeZoom( float zoom ) { + if ( mCurrentUI == EnumMapUI.Type_VR ) { + return MapControlResult.ERROR; + } Logger.d( TAG, "changeZoom %s", zoom ); if ( DebugConfig.isDebug() ) { Logger.d( TAG, Log.getStackTraceString( new Throwable() ) ); } - if ( mCurrentUI == EnumMapUI.Type_VR ) { - return MapControlResult.ERROR; - } getMap().changeZoom( zoom ); return MapControlResult.SUCCESS; } @@ -364,6 +364,9 @@ public class AMapViewWrapper implements IMogoMapView, mMapView.getMapAutoViewHelper().setMapViewPerspective( MapAutoApi.MAP_PERSPECTIVE_UP_CAR ); break; case NorthUP_2D: + if ( mCurrentUI == EnumMapUI.Type_VR ) { + return; + } mMapView.getMapAutoViewHelper().setMapViewPerspective( MapAutoApi.MAP_PERSPECTIVE_UP_NORTH ); break; } @@ -447,6 +450,9 @@ public class AMapViewWrapper implements IMogoMapView, // if ( DebugConfig.isDebug() ) { // Logger.d( TAG, Log.getStackTraceString( new Throwable() ) ); // } + if ( mCurrentUI == EnumMapUI.Type_VR ) { + return; + } Logger.d( TAG, "锁车" ); // mMapView.getMapAutoViewHelper().setZoom(mLockZoom); mMapView.getMapAutoViewHelper().setLockMode( true ); @@ -820,11 +826,12 @@ public class AMapViewWrapper implements IMogoMapView, mCurrentUI = EnumMapUI.Type_Night; } else if ( i == MapAutoApi.MAP_STYLE_VR ) { mCurrentUI = EnumMapUI.Type_VR; - } else if ( i == MapAutoApi.MAP_PERSPECTIVE_2D ) { - mCurrentUI = EnumMapUI.CarUp_2D; - } else if ( i == MapAutoApi.MAP_PERSPECTIVE_3D ) { - mCurrentUI = EnumMapUI.CarUp_3D; } +// else if ( i == MapAutoApi.MAP_PERSPECTIVE_2D ) { +// mCurrentUI = EnumMapUI.CarUp_2D; +// } else if ( i == MapAutoApi.MAP_PERSPECTIVE_3D ) { +// mCurrentUI = EnumMapUI.CarUp_3D; +// } if ( last == mCurrentUI ) { return;