[Upload]
删除冗余代码 MoGoEagleEye.modules.mogo-module-map MoGoEagleEye.modules.mogo-module-service MoGoEagleEye.modules.mogo-module-share MoGoEagleEye.services.mogo-service-api Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -450,11 +450,6 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
if (mCurrentUI == EnumMapUI.Type_VR) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (visible && NaviClient.getInstance(getContext()).isNaviing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (checkAMapView()) {
|
||||
MyLocationStyle style = mMapView.getMapAutoViewHelper().getMyLocationStyle();
|
||||
if (visible) {
|
||||
@@ -468,9 +463,6 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
@Override
|
||||
public void showMyLocation(View view) {
|
||||
Logger.d(TAG, "showMyLocation %s", "view");
|
||||
if (NaviClient.getInstance(getContext()).isNaviing()) {
|
||||
return;
|
||||
}
|
||||
if (DebugConfig.isDebug()) {
|
||||
Logger.d(TAG, Log.getStackTraceString(new Throwable()));
|
||||
}
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
package com.mogo.map.impl.custom.navi;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
import android.location.Location;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.map.impl.custom.AMapWrapper;
|
||||
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
|
||||
import com.mogo.map.navi.IMogoNavi;
|
||||
import com.mogo.map.navi.MogoCalculatePath;
|
||||
import com.mogo.map.navi.MogoCarLocationChangedListenerRegister;
|
||||
import com.mogo.map.navi.MogoNaviConfig;
|
||||
import com.mogo.map.navi.OnCalculatePathItemClickInteraction;
|
||||
@@ -26,40 +23,21 @@ import java.util.List;
|
||||
*/
|
||||
public class NaviClient implements IMogoNavi {
|
||||
|
||||
/**
|
||||
* 巡航状态控制
|
||||
*/
|
||||
public static final String KEY_AIMLESS_STATUS = "KEY_AIMLESS_STATUS";
|
||||
|
||||
private static final String TAG = "NaviClient";
|
||||
private final Context mContext;
|
||||
|
||||
private MapAutoViewHelper mAMapNavi;
|
||||
|
||||
/**
|
||||
* 导航策略配置
|
||||
*/
|
||||
|
||||
private MogoNaviConfig mMogoNaviConfig = new MogoNaviConfig();
|
||||
|
||||
private static volatile NaviClient sInstance;
|
||||
private boolean mIsRealNavi;
|
||||
|
||||
private Location mCarLocation = new Location("GPS");
|
||||
/**
|
||||
* 巡航模式配置状态
|
||||
*/
|
||||
private boolean mAimlessModeStatus;
|
||||
|
||||
/**
|
||||
* 巡航状态
|
||||
*/
|
||||
private boolean mAimlessStatus;
|
||||
|
||||
private NaviClient(Context context) {
|
||||
mCarLocation.setLongitude(116.97000);
|
||||
mCarLocation.setLatitude(39.97000);
|
||||
mContext = context;
|
||||
mAMapNavi = AMapWrapper.getAMap();
|
||||
}
|
||||
|
||||
@@ -88,11 +66,6 @@ public class NaviClient implements IMogoNavi {
|
||||
naviTo(endPoint, null, config);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void naviTo(MogoLatLng endPoint, List<MogoLatLng> wayPoints) {
|
||||
naviTo(endPoint, wayPoints, mMogoNaviConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void naviTo(MogoLatLng endPoint, List<MogoLatLng> wayPoints, MogoNaviConfig config) {
|
||||
if (!checkAMapNavi()) {
|
||||
@@ -105,74 +78,16 @@ public class NaviClient implements IMogoNavi {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reCalculateRoute(MogoNaviConfig config) {
|
||||
if (!checkAMapNavi()) {
|
||||
return;
|
||||
}
|
||||
mMogoNaviConfig = config;
|
||||
if (mMogoNaviConfig == null) {
|
||||
mMogoNaviConfig = new MogoNaviConfig();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopNavi() {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void startNavi(boolean isRealNavi) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNaviing() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MogoCalculatePath> getCalculatedStrategies() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MogoLatLng> getCalculatedPathPos() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OnCalculatePathItemClickInteraction getItemClickInteraction() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLineClickInteraction(OnCalculatePathItemClickInteraction lineClickInteraction) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearCalculatePaths() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCalculatePathDisplayBounds(Rect bounds) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoNaviConfig getNaviConfig() {
|
||||
return mMogoNaviConfig;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setBroadcastMode(int mode) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MogoLatLng> getNaviPathCoordinates() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoLatLng getCarLocation() {
|
||||
if (mCarLocation != null) {
|
||||
@@ -219,46 +134,4 @@ public class NaviClient implements IMogoNavi {
|
||||
public void stopAimlessMode() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAimlessModeStatus(boolean open) {
|
||||
this.mAimlessModeStatus = open;
|
||||
SharedPrefsMgr.getInstance(mContext).putBoolean(KEY_AIMLESS_STATUS, open);
|
||||
if (open) {
|
||||
if (!mAimlessStatus) {
|
||||
startAimlessMode();
|
||||
}
|
||||
} else {
|
||||
if (mAimlessStatus) {
|
||||
stopAimlessMode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayOverview(Rect bounds) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUseExtraGPSData(boolean use) {
|
||||
Logger.d(TAG, "设置外部gps源状态 %s", use);
|
||||
mAMapNavi.setIsUseExtraGPSData(use);
|
||||
AMapWrapper.getAMap().setMyLocationEnabled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExtraGPSData(double lon, double lat, float speed, float accuracy, float bearing, long timestamp) {
|
||||
if (!mAMapNavi.getIsUseExtraGPSData()) {
|
||||
Logger.d(TAG, "拒绝外部GPS数据");
|
||||
return;
|
||||
}
|
||||
Location location = new Location("外部GPS源");
|
||||
location.setLongitude(lon);
|
||||
location.setLatitude(lat);
|
||||
location.setSpeed(speed);
|
||||
location.setAccuracy(accuracy);
|
||||
location.setBearing(bearing);
|
||||
location.setTime(timestamp);
|
||||
//type字段传1时代表WGS84坐标
|
||||
mAMapNavi.setExtraGPSData(2, location);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user