Merge branch 'dev_custom_map' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into dev_custom_map
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user