@@ -3,17 +3,12 @@ package com.mogo.module.service;
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.IMogoMarkerManager;
|
||||
import com.mogo.map.navi.IMogoNavi;
|
||||
import com.mogo.map.overlay.IMogoOverlayManager;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.drawer.MarkerDrawer;
|
||||
import com.mogo.module.common.entity.MarkerResponse;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.service.marker.MapMarkerManager;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.adas.IMogoADASController;
|
||||
@@ -60,7 +55,6 @@ public class MarkerServiceHandler {
|
||||
private static ICarsChattingProvider sCarChatting;
|
||||
private static IMogoOverlayManager sIMogoOverlayManager;
|
||||
|
||||
// private static IMogoGpsSimulatorManager sGpsSimulatorManager;
|
||||
|
||||
public static synchronized void init( final Context context ) {
|
||||
|
||||
@@ -88,8 +82,6 @@ public class MarkerServiceHandler {
|
||||
sCarChatting = ( ICarsChattingProvider ) ARouter.getInstance().build( CallChattingProviderConstant.CAR_CALL_PROVIDER ).navigation( context );
|
||||
|
||||
MapMarkerManager.getInstance().init( context );
|
||||
|
||||
// sGpsSimulatorManager = ARouter.getInstance().navigation( IMogoGpsSimulatorManager.class );
|
||||
}
|
||||
|
||||
public static IMogoServiceApis getApis() {
|
||||
@@ -167,41 +159,4 @@ public class MarkerServiceHandler {
|
||||
public static IMogoOverlayManager getsIMogoOverlayManager() {
|
||||
return sIMogoOverlayManager;
|
||||
}
|
||||
|
||||
public static void setsIMogoOverlayManager(IMogoOverlayManager sIMogoOverlayManager) {
|
||||
MarkerServiceHandler.sIMogoOverlayManager = sIMogoOverlayManager;
|
||||
}
|
||||
|
||||
//TODO -------------以下方法是临时过度使用的,后面统一使用,getMapMarkerManager进行调用
|
||||
|
||||
/**
|
||||
* 绘制Marker
|
||||
* 建议使用
|
||||
*
|
||||
* @see MapMarkerManager#drawMapMarker(MarkerResponse)
|
||||
*/
|
||||
@Deprecated
|
||||
public static void drawMapMarker( MarkerResponse response ) {
|
||||
getMapMarkerManager().drawMapMarker( response );
|
||||
}
|
||||
|
||||
/**
|
||||
* 绘制Marker
|
||||
* 建议使用
|
||||
*
|
||||
* @see MapMarkerManager#drawMapMarker(MarkerShowEntity, int)
|
||||
*/
|
||||
@Deprecated
|
||||
public static IMogoMarker drawMapMarker( MarkerShowEntity markerShowEntity ) {
|
||||
return getMapMarkerManager().drawMapMarker( markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_HIGH );
|
||||
}
|
||||
|
||||
/**
|
||||
* 对指定类型高亮处理
|
||||
* 建议使用
|
||||
*/
|
||||
@Deprecated
|
||||
public static void highlightedMarker( String typeTag ) {
|
||||
Logger.w( TAG, "do not invoke this method any more." );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,7 +213,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
}
|
||||
mStatusManager.setUserInteractionStatus( ServiceConst.TYPE, true, false );
|
||||
mUiController.changeZoom( ServiceConst.DEFAULT_LOCK_CAR_ZOOM_LEVEL );
|
||||
// mUiController.setLockZoom( ServiceConst.DEFAULT_LOCK_CAR_ZOOM_LEVEL );
|
||||
mStatusManager.setUserInteractionStatus( TAG, true, false );
|
||||
mUiController.recoverLockMode();
|
||||
notifyRefreshData( mLastAutoRefreshLocation, ServiceConst.DEFAULT_AUTO_REFRESH_DATA_RADIUS, mAutoRefreshCallback );
|
||||
@@ -415,9 +414,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
}
|
||||
//请求大而全数据,刷新地图POI
|
||||
mRefreshModel.refreshExplorerWayData( ro.mLonLat, ro.mRadius, ro.mAmount, ro.mCallback );
|
||||
// if ( !DebugConfig.
|
||||
// isNeedUploadCoordinatesDurationInTime() ) { //todo 实时在线车辆需要注释,否则在2D模式下不能展示
|
||||
// }
|
||||
//请求在线车辆数据,刷新地图在线车辆
|
||||
if (!mLastStatusIsVr){
|
||||
MapMarkerManager.getInstance().getOnlineCarDataByAutoRefreshStrategy( ro.mLonLat );
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.ResourcesHelper;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadPoolService;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.eagle.core.utilcode.util.ViewUtils;
|
||||
@@ -39,7 +40,6 @@ import com.mogo.realtime.api.MoGoAiCloudRealTime;
|
||||
import com.mogo.realtime.socket.IMogoCloudOnMsgListener;
|
||||
import com.mogo.service.adas.IMogoADASControlStatusChangedListener;
|
||||
import com.mogo.service.module.IMogoBizActionDoneListener;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.ResourcesHelper;
|
||||
import com.zhidao.carchattingprovider.ICallChatResponse;
|
||||
|
||||
import org.json.JSONArray;
|
||||
@@ -143,74 +143,11 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
@Override
|
||||
public void onMsgReceived(SocketDownData.LauncherSnapshotProto mogoSnapshotSetData) {
|
||||
DebugConfig.setStatus(DebugConfig.sDownloadSnapshot, true);
|
||||
// SnapshotSetDataDrawer.getInstance().renderSnapshotData(mogoSnapshotSetData);
|
||||
// Message msg = mSnapshotHandler.obtainMessage();
|
||||
// msg.obj = mogoSnapshotSetData;
|
||||
// msg.what = MSG_SNAPSHOT;
|
||||
// msg.sendToTarget();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 实时绘制连线
|
||||
// *
|
||||
// * @param result
|
||||
// */
|
||||
// private void drawLimberCollisionPolyline(ADASRecognizedResult result) {
|
||||
// if (result != null) {
|
||||
// IMogoPolyline polyLine = LimberCollisionPolyline.getInstance().getPolyLine();
|
||||
// MogoLatLng startLatLng = new MogoLatLng(result.lat, result.lon);
|
||||
// MogoLatLng endLatlng = Trigonometric.getNewLocation(startLatLng, 20, result.heading);
|
||||
// Log.d(TAG, "红色区域起始点 = " + startLatLng.lon + "," + startLatLng.lat
|
||||
// + "终点" + endLatlng.lon + "," + endLatlng.lat + "--heading =" + result.heading);
|
||||
// if (polyLine != null) {
|
||||
// Log.d(TAG, "drawStopLine polyLine != null");
|
||||
// polyLine.setPoints(Arrays.asList(startLatLng, endLatlng));
|
||||
// } else {
|
||||
// List<MogoLatLng> latLngs = new ArrayList<>();
|
||||
// latLngs.add(startLatLng);
|
||||
// latLngs.add(endLatlng);
|
||||
// LimberCollisionPolyline.getInstance().draw((float) result.roadWidth, latLngs);
|
||||
// }
|
||||
// } else {
|
||||
// LimberCollisionPolyline.getInstance().clearLine();
|
||||
// }
|
||||
// }
|
||||
|
||||
// private final static int MSG_SNAPSHOT = 1;
|
||||
// private final static int MSG_ADAS = 2;
|
||||
//
|
||||
// /**
|
||||
// * todo 后续从云端和adas侧拿到的数据 需求对数据流进行重新架构以扩展除添加marker外的其他预警类业务
|
||||
// * todo (应需要模块主动注册adas或云端数据回调,在具体模块内添加绘制需求,需要与地图侧确认是否支持并发)
|
||||
// */
|
||||
// private final Handler mSnapshotHandler = new Handler(WorkThreadHandler.newInstance("snapshot-thread").getLooper()) {
|
||||
// @Override
|
||||
// public void handleMessage(Message msg) {
|
||||
// super.handleMessage(msg);
|
||||
// switch (msg.what) {
|
||||
// case MSG_SNAPSHOT:
|
||||
// if (msg.obj instanceof SocketDownData.LauncherSnapshotProto) {
|
||||
// SnapshotSetDataDrawer.getInstance().renderSnapshotData(((SocketDownData.LauncherSnapshotProto) msg.obj));
|
||||
// } else {
|
||||
// SnapshotSetDataDrawer.getInstance().renderSnapshotData(null);
|
||||
// }
|
||||
// break;
|
||||
// case MSG_ADAS:
|
||||
// // 绘制近景识别到的车辆
|
||||
// if (msg.obj instanceof List) {
|
||||
// List<ADASRecognizedResult> recognizedResults = (List<ADASRecognizedResult>) msg.obj;
|
||||
// AdasRecognizedResultDrawer.getInstance().renderAdasRecognizedResult(recognizedResults);
|
||||
// }
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
|
||||
/**
|
||||
* 地图上的Marker点击回调
|
||||
*/
|
||||
@@ -613,10 +550,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
int radius,
|
||||
boolean fitBounds) {
|
||||
|
||||
// if ( DebugConfig.isNeedUploadCoordinatesDurationInTime() ) {//todo 实时在线车辆需要注释,否则在2D模式下不能展示
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (DebugConfig.isDebug()) {
|
||||
if (!DebugConfig.isRequestOnlineCarData()) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user