@@ -17,7 +17,6 @@ import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.Interpolator;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mogo.commons.FunctionBuildConfig;
|
||||
@@ -33,7 +32,6 @@ import com.mogo.map.impl.custom.utils.ObjectUtils;
|
||||
import com.mogo.map.impl.custom.utils.PointInterpolatorUtil;
|
||||
import com.mogo.map.impl.custom.utils.ResIdCache;
|
||||
import com.mogo.map.listener.MogoMapListenerHandler;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.uicontroller.CarCursorOption;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
@@ -458,9 +456,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
if (visible && NaviClient.getInstance(getContext()).isNaviing()) {
|
||||
return;
|
||||
}
|
||||
// if (DebugConfig.isDebug()) {
|
||||
// Logger.d(TAG, Log.getStackTraceString(new Throwable()));
|
||||
// }
|
||||
|
||||
if (checkAMapView()) {
|
||||
MyLocationStyle style = mMapView.getMapAutoViewHelper().getMyLocationStyle();
|
||||
if (visible) {
|
||||
@@ -504,9 +500,6 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
@Override
|
||||
public void recoverLockMode() {
|
||||
if (checkAMapView()) {
|
||||
// if ( DebugConfig.isDebug() ) {
|
||||
// Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
|
||||
// }
|
||||
if (mCurrentUI == EnumMapUI.Type_VR) {
|
||||
return;
|
||||
}
|
||||
@@ -562,7 +555,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
try {
|
||||
return ObjectUtils.fromAMap(MapTools.INSTANCE.getVisibleRegion().getLeftBottomPoint());
|
||||
} catch (Exception e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -572,7 +565,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
try {
|
||||
return ObjectUtils.fromAMap(mMapView.getMapAutoViewHelper().getCenter());
|
||||
} catch (Exception e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -594,6 +587,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
try {
|
||||
return MapTools.INSTANCE.toScreenLocation(ObjectUtils.fromMogo(latLng));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -607,38 +601,13 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
return ObjectUtils.fromAMap(
|
||||
MapTools.INSTANCE.fromScreenLocation(point));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startJumpAnimation(IMogoMarker marker, float high, Interpolator interpolator,
|
||||
long duration) {
|
||||
if (marker == null || high <= 0.0f || interpolator == null || duration < 0) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// final LatLng latLng = ObjectUtils.fromMogo2( marker.getPosition() );
|
||||
// Point point = mMapView.getMap().getProjection().toScreenLocation( latLng );
|
||||
// point.y -= WindowUtils.dip2px( getContext(), high );
|
||||
// LatLng target = mMapView.getMap().getProjection().fromScreenLocation( point );
|
||||
// //使用TranslateAnimation,填写一个需要移动的目标点
|
||||
// Animation animation = new TranslateAnimation( target );
|
||||
// animation.setInterpolator( interpolator );
|
||||
// //整个移动所需要的时间
|
||||
// animation.setDuration( duration );
|
||||
// //设置动画
|
||||
// if ( marker instanceof AMapMarkerWrapper ) {
|
||||
// ( ( AMapMarkerWrapper ) marker ).getMarker().setAnimation( animation );
|
||||
// ( ( AMapMarkerWrapper ) marker ).getMarker().startAnimation();
|
||||
// }
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, e, "error.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRenderFps(int fps) {
|
||||
if (checkAMapView()) {
|
||||
@@ -833,14 +802,6 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
//showSelfSpeed(location.getSpeed());
|
||||
}
|
||||
|
||||
private int mDrawlevel;
|
||||
|
||||
@Override
|
||||
public void setAdasRecognizedResult(int drawlevel) {
|
||||
mDrawlevel = drawlevel;
|
||||
}
|
||||
|
||||
|
||||
private TextView mSpeedView = null;
|
||||
private int mLastYOffset = 20;
|
||||
|
||||
@@ -936,7 +897,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
|
||||
@Override
|
||||
public void onMapStatusChanged(int type, int value) {
|
||||
// Logger.i( TAG, "mapop--onMapStatusChanged-: " + type + "," + value );
|
||||
//Logger.i(TAG, "mapop--onMapStatusChanged-: " + type + "," + value);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -961,7 +922,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
|
||||
@Override
|
||||
public void onCameraChange(int type, int value) {
|
||||
// Logger.i( TAG, "mapop--onCameraChange-: " + type + "," + value );
|
||||
//Logger.i(TAG, "mapop--onCameraChange-: " + type + "," + value);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -977,24 +938,11 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAnchorScale(float x, float y) {
|
||||
mMapView.getMapAutoViewHelper().setAnchorScale(x, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAnchorRate(float rate) {
|
||||
mMapView.getMapAutoViewHelper().setAnchorRate(rate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void emphasizeMyLocation() {
|
||||
|
||||
}
|
||||
|
||||
//目前切换完vr之后,会立即回调其他样式,这里做一个判断
|
||||
// private boolean mVrModeAutoChangedFlag = false;
|
||||
|
||||
@Override
|
||||
public void onChangeMapStyle(int i) {
|
||||
|
||||
@@ -1012,11 +960,6 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
// 进入vr模式的时候自动切换到车头朝上
|
||||
change2CarUp();
|
||||
}
|
||||
// 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) {
|
||||
Logger.d(TAG, "currentUI is same as last = %s", mCurrentUI);
|
||||
@@ -1024,17 +967,11 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
}
|
||||
|
||||
// vr 模式切换到普通模式下,保持之前的白天模式 wtf.
|
||||
if (last == EnumMapUI.Type_VR
|
||||
&& mCurrentUI != last
|
||||
&& mCurrentUI != EnumMapUI.Type_Light) {
|
||||
if (last == EnumMapUI.Type_VR && mCurrentUI != EnumMapUI.Type_Light) {
|
||||
if (mIsLightStyle) {
|
||||
changeMapMode(EnumMapUI.Type_Light);
|
||||
return;
|
||||
}
|
||||
// if ( mVrModeAutoChangedFlag ) {
|
||||
// mVrModeAutoChangedFlag = false;
|
||||
// return;
|
||||
// }
|
||||
}
|
||||
Logger.d(TAG, Log.getStackTraceString(new Throwable()));
|
||||
if (mCurrentUI != null) {
|
||||
@@ -1066,7 +1003,6 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
if (isVrMode) {
|
||||
if (mCurrentUI != EnumMapUI.Type_VR) {
|
||||
Logger.d(TAG, "自动切换为vr模式");
|
||||
// mVrModeAutoChangedFlag = true;
|
||||
changeMapMode(EnumMapUI.Type_VR);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -4,10 +4,8 @@ import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.location.Location;
|
||||
import android.view.View;
|
||||
import android.view.animation.Interpolator;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.uicontroller.CarCursorOption;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
@@ -221,13 +219,6 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startJumpAnimation(IMogoMarker marker, float high, Interpolator interpolator,
|
||||
long duration) {
|
||||
if (mClient != null) {
|
||||
mClient.startJumpAnimation(marker, high, interpolator, duration);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRenderFps(int fps) {
|
||||
@@ -308,21 +299,11 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
return MapAutoApi.INSTANCE.getTileID(lon, lat, 13); // 13为默认获取瓦片层级级别
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAnchorScale(float x, float y) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void emphasizeMyLocation() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAnchorRate(float rate) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rtkEnable(boolean enable) {
|
||||
if (mClient != null) {
|
||||
@@ -374,10 +355,4 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAdasRecognizedResult(int drawlevel) {
|
||||
if (mClient != null) {
|
||||
mClient.setAdasRecognizedResult(drawlevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user