From 7d71476bfa9edbf029ba8ae3baf9167a614ba6e4 Mon Sep 17 00:00:00 2001 From: jiaguofeng Date: Mon, 29 Jun 2020 17:05:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=9A=E4=BD=8Dicon?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mogo/map/impl/custom/AMapViewWrapper.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) 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 f53ad06e9d..e1e32658c1 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 @@ -614,20 +614,13 @@ public class AMapViewWrapper implements IMogoMapView, IMogoMapUIController, Loca if (!checkAMapView()) { return; } -// AMapNaviViewOptions options = mMapView.getViewOptions(); -// if ( options != null && mCarCursorOption.getNaviCursorRes() != 0 ) { -// options.setCarBitmap( BitmapFactory.decodeResource( getContext().getResources(), mCarCursorOption.getNaviCursorRes() ) ); -// } else { -// options.setCarBitmap( BitmapFactory.decodeResource( getContext().getResources(), DEFAULT_OPTION.getNaviCursorRes() ) ); -// } -// mMapView.setViewOptions( options ); if (mMapView.getMapAutoViewHelper() == null) { return; } MyLocationStyle style = mMapView.getMapAutoViewHelper().getMyLocationStyle(); if (mCarCursorOption.getCarCursorBmp() != null && !mCarCursorOption.getCarCursorBmp().isRecycled()) { -// style.myLocationIcon( BitmapDescriptorFactory.fromBitmap( mCarCursorOption.getCarCursorBmp() ) ); + style.myLocationIcon(mCarCursorOption.getCarCursorBmp()); } else { if (mCarCursorOption.getCarCursorRes() != 0) { style.myLocationIcon(mCarCursorOption.getCarCursorRes()); @@ -650,7 +643,7 @@ public class AMapViewWrapper implements IMogoMapView, IMogoMapUIController, Loca @Override public void changeBearing(float bearing) { if (checkAMapView()) { -// mMapView.getMap().moveCamera( CameraUpdateFactory.changeBearing( bearing ) ); + mMapView.getMapAutoViewHelper().setMapViewRotation(bearing); } } From b79d24e089a84ebc850302bba51b57461bd73ec4 Mon Sep 17 00:00:00 2001 From: jiaguofeng Date: Tue, 30 Jun 2020 11:03:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=94=9A=E7=82=B9?= =?UTF-8?q?=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map/impl/custom/marker/AMapMarkerWrapper.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/marker/AMapMarkerWrapper.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/marker/AMapMarkerWrapper.java index 7c6fb883aa..2ea989dcc1 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/marker/AMapMarkerWrapper.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/marker/AMapMarkerWrapper.java @@ -6,6 +6,7 @@ import android.util.Log; import android.view.View; import android.view.animation.Animation; import android.view.animation.Interpolator; +import android.view.animation.ScaleAnimation; import android.view.animation.TranslateAnimation; import com.mogo.commons.AbsMogoApplication; @@ -20,6 +21,7 @@ import com.mogo.map.marker.MogoMarkerOptions; import com.mogo.map.marker.anim.OnMarkerAnimationListener; import com.mogo.utils.WindowUtils; import com.mogo.utils.logger.Logger; +import com.zhidaoauto.map.sdk.inner.marker.MarkerScaleAnimation; import com.zhidaoauto.map.sdk.inner.marker.MarkerTranslateAnimation; import com.zhidaoauto.map.sdk.open.marker.Marker; import com.zhidaoauto.map.sdk.open.marker.MarkerInfo; @@ -357,8 +359,8 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer { return; } -// ScaleAnimation animationScale = new ScaleAnimation(fromX, toX, fromY, toY); -// animationScale.setDuration(duration); + MarkerScaleAnimation animationScale = new MarkerScaleAnimation(fromX, toX); + animationScale.setDuration(duration); // animationScale.setFillMode(Animation.FILL_MODE_FORWARDS); // animationScale.setInterpolator(interpolator); // animationScale.setAnimationListener(new Animation.AnimationListener() { @@ -382,9 +384,9 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer { // } // } // }); -// -// mMarker.setAnimation(animationScale); -// mMarker.startAnimation(); + + mMarker.setMarkerScaleAnimation(animationScale); + mMarker.startAnimation(); } @Override @@ -424,7 +426,7 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer { //整个移动所需要的时间 animation.setDuration(duration); //设置动画 - mMarker.setAnimation(animation); + mMarker.setTranslateAnimation(animation); mMarker.startAnimation(); } catch (Exception e) { Logger.e(TAG, e, "error.");