Merge branch 'dev_arch_opt_3.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_arch_opt_3.0
Conflicts: app_ipc_monitoring/src/main/java/com/zhidao/adas/client/ui/MainActivity.java app_mogo_magic_ring/src/main/java/com/zhidao/adas/magic/ui/MainActivity.java libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/msg/ObuWarningDataMessage.java
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
syntax = "proto3";
|
||||
package mogo.yycp.service;
|
||||
option java_package = "mogo.yycp.api.proto";
|
||||
option java_outer_classname = "SocketDownData";
|
||||
/*
|
||||
message xxx {
|
||||
// 字段规则:required -> 字段只能也必须出现 1 次
|
||||
// 字段规则:optional -> 字段可出现 0 次或1次
|
||||
// 字段规则:repeated -> 字段可出现任意多次(包括 0)
|
||||
// 类型:int32、int64、sint32、sint64、string、32-bit ....
|
||||
// 字段编号:0 ~ 536870911(除去 19000 到 19999 之间的数字)
|
||||
字段规则 类型 名称 = 字段编号;
|
||||
}
|
||||
*/
|
||||
//返回车机主实体
|
||||
message SocketDownDataProto {
|
||||
uint64 seq = 1;
|
||||
uint32 msgType = 2;
|
||||
string sn = 3;
|
||||
LauncherSnapshotProto data = 4;
|
||||
uint64 utcTime = 5;
|
||||
uint64 upUtcTime = 6;
|
||||
string cityCode = 7;
|
||||
}
|
||||
|
||||
//LauncherSnapshot数据响应VO
|
||||
message LauncherSnapshotProto {
|
||||
//总数据集合 RoadDataVo
|
||||
repeated CloudRoadDataProto allList = 1;
|
||||
//前方50米数据集合 RoadDataVo
|
||||
repeated CloudRoadDataProto nearList = 2;
|
||||
//摄像头 RoadDataVo
|
||||
CloudRoadDataProto camera = 3;
|
||||
string msgId = 4;
|
||||
uint64 time = 5;
|
||||
//过期时间
|
||||
uint64 expire = 6;
|
||||
}
|
||||
//RoadDataVo
|
||||
message CloudRoadDataProto {
|
||||
/**物体类型 1-人 2-自行车 3-小轿车 4-摩托车 5-红绿灯 6-bus 8-truck 9-路边摄像头*/
|
||||
uint32 type = 1;
|
||||
/**数据来源 1,"自车数据" 2,"ADAS数据" 3,"路测设备识别数据" */
|
||||
uint32 fromType = 2;
|
||||
/**
|
||||
* 车机上行pgs坐标给lat,lon两个成员变量
|
||||
*
|
||||
* 在下发车机时计算高德经纬度
|
||||
* 1.将gps(lat,lon)给wgslat,wgalon
|
||||
* 2.高德算法算出高德经纬度,给lat,lon
|
||||
*/
|
||||
double lat = 3; //gps->gd
|
||||
double lon = 4; //gps->gd
|
||||
double wgslat = 5; //原gps
|
||||
double wgslon = 6; //原gps
|
||||
//车机sn
|
||||
string sn = 7;
|
||||
//车辆UUID
|
||||
string uuid = 8;
|
||||
/** 车牌号 */
|
||||
string cardId = 9;
|
||||
/**速度*/
|
||||
double speed = 10;
|
||||
/**方向*/
|
||||
double heading = 11;
|
||||
/** 系统时间 */
|
||||
uint64 systemTime = 12;
|
||||
/** 星历时间 */
|
||||
uint64 satelliteTime = 13;
|
||||
/**红绿灯状态 1红 2绿 3黄*/
|
||||
uint32 lightStatus = 14;
|
||||
/**红绿灯剩余时间 读秒*/
|
||||
uint32 lightLeftTime = 15;
|
||||
/**视频流直播地址*/
|
||||
string rtmpUrl = 16;
|
||||
/**距离*/
|
||||
double distance = 17;
|
||||
}
|
||||
@@ -188,7 +188,7 @@ message AutopilotState
|
||||
message PlanningObject
|
||||
{
|
||||
uint32 uuid = 1;
|
||||
uint32 type = 2; //影响自车决策的类型, 和感知的障碍物类型不是一回事 0是leading障碍物,1是避障和择机的障碍物
|
||||
uint32 type = 2; //影响自车决策的类型, 和感知的障碍物类型不是一回事
|
||||
}
|
||||
|
||||
message PlanningObjects
|
||||
|
||||
@@ -195,14 +195,6 @@ public interface OnAdasListener {
|
||||
*/
|
||||
void onPlanningActionMsg(MessagePad.Header header, MessagePad.PlanningActionMsg planningActionMsg);
|
||||
|
||||
/**
|
||||
* OBU预警事件
|
||||
*
|
||||
* @param header 头
|
||||
* @param obuWarningData 数据
|
||||
*/
|
||||
void onObuWarningData(MessagePad.Header header, ObuWarningEvent.ObuWarningData obuWarningData);
|
||||
|
||||
/**
|
||||
* OBU 红绿灯预警信息
|
||||
*
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.map;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.map.center.CenterLine;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
@@ -12,6 +13,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.yycp.api.proto.SocketDownData;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -51,6 +53,13 @@ public interface IMogoMap {
|
||||
*/
|
||||
void updateBatchMarkerPosition(HashMap<String, MessagePad.TrackedObject> optionsArrayList);
|
||||
|
||||
/**
|
||||
* 批量更新锚点位置
|
||||
*
|
||||
* @param optionsArrayList 锚点集合
|
||||
*/
|
||||
void updateBatchAiMarkerPosition(HashMap<String, SocketDownData.CloudRoadDataProto> optionsArrayList);
|
||||
|
||||
/**
|
||||
* 添加感知使用到的3d模型
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.yycp.api.proto.SocketDownData;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -44,6 +45,13 @@ public interface IMogoMarkerManager {
|
||||
*/
|
||||
void updateBatchMarkerPosition(HashMap<String, MessagePad.TrackedObject> optionsArrayList);
|
||||
|
||||
/**
|
||||
* 批量更新锚点位置
|
||||
*
|
||||
* @param optionsArrayList 锚点集合
|
||||
*/
|
||||
void updateBatchAiMarkerPosition(HashMap<String, SocketDownData.CloudRoadDataProto> optionsArrayList);
|
||||
|
||||
/**
|
||||
* 添加感知使用到的3d模型
|
||||
*
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.map.uicontroller;
|
||||
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.location.Location;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -12,11 +11,8 @@ import com.mogo.eagle.core.data.map.CenterLine;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -32,6 +28,13 @@ public interface IMogoMapUIController {
|
||||
*/
|
||||
MapControlResult changeZoom(float zoom);
|
||||
|
||||
/**
|
||||
* 设置地图是否是Debug模式
|
||||
*
|
||||
* @param debugMode 是否开启Debug模式
|
||||
*/
|
||||
void setDebugMode(Boolean debugMode);
|
||||
|
||||
/**
|
||||
* 进入VR 模式
|
||||
*
|
||||
@@ -46,6 +49,17 @@ public interface IMogoMapUIController {
|
||||
*/
|
||||
void changeMapVisualAngle(VisualAngleMode angelMode, MogoLatLng mogoLatLng);
|
||||
|
||||
/**
|
||||
* 设置漫游路径
|
||||
* @param trajectory
|
||||
*/
|
||||
void setRoamTrajectory(String trajectory);
|
||||
|
||||
/**
|
||||
* 设置漫游模式 , 0:自由漫游,1:路径漫游
|
||||
*/
|
||||
void setRomaMode(int mode);
|
||||
|
||||
/**
|
||||
* 获得当前地图视距模式
|
||||
*
|
||||
@@ -77,15 +91,6 @@ public interface IMogoMapUIController {
|
||||
*/
|
||||
void showMyLocation(View view);
|
||||
|
||||
|
||||
/**
|
||||
* 以外部定位的方式改变当前位置
|
||||
*
|
||||
* @param location
|
||||
*/
|
||||
void changeMyLocation(Location location);
|
||||
|
||||
|
||||
/**
|
||||
* 获取比例尺数据
|
||||
*
|
||||
@@ -180,7 +185,6 @@ public interface IMogoMapUIController {
|
||||
void setCarCursorOption(@Nullable CarCursorOption option);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param type :车尾灯类型 time: 闪烁时间 最小500ms 小于500ms 默认为500ms
|
||||
*/
|
||||
void setCarLightsType(int type, int time);
|
||||
@@ -263,17 +267,6 @@ public interface IMogoMapUIController {
|
||||
|
||||
}
|
||||
|
||||
//todo 改造,此处调用到数据中心同步,删除此处更新。后续更新调用, {@link CallerMapUIServiceManager#getSingletonLocationClient}
|
||||
/**
|
||||
* 使用自动驾驶车的定位数据
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
default void syncLocation2Map(JSONObject data) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取车速资源缓存 id
|
||||
*
|
||||
@@ -308,9 +301,10 @@ public interface IMogoMapUIController {
|
||||
|
||||
/**
|
||||
* 获取当前道路方向
|
||||
*
|
||||
* @return angle
|
||||
*/
|
||||
Double getRoadAngle(Double lon,Double lat,float angle);
|
||||
Double getRoadAngle(Double lon, Double lat, float angle);
|
||||
|
||||
/**
|
||||
* 设置锁屏模式
|
||||
@@ -333,4 +327,25 @@ public interface IMogoMapUIController {
|
||||
* @param gnssInfo RTK 高精坐标,车辆惯导数据
|
||||
*/
|
||||
void setExtraGPSData(MogoLocation gnssInfo);
|
||||
|
||||
/**
|
||||
* 打开点云绘制
|
||||
*
|
||||
* @param isDrawPointCloud 是否绘制点云
|
||||
*/
|
||||
void setIsDrawPointCloud(Boolean isDrawPointCloud);
|
||||
|
||||
/**
|
||||
* 设制点云大小
|
||||
*
|
||||
* @param pointCloudSize 点云的点大小
|
||||
*/
|
||||
void setPointCloudSize(Float pointCloudSize);
|
||||
|
||||
/**
|
||||
* 设置点云颜色
|
||||
*
|
||||
* @param color // color:"#RRGGBB*
|
||||
*/
|
||||
void setPointCloudColor(String color);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,12 @@ public enum VisualAngleMode implements IMogoMapVisualAngle {
|
||||
/**
|
||||
* 十字路口视角
|
||||
*/
|
||||
MAP_STYLE_VR_ANGLE_CROSS(5);
|
||||
MAP_STYLE_VR_ANGLE_CROSS(5),
|
||||
|
||||
/**
|
||||
* 漫游模式
|
||||
*/
|
||||
MAP_STYLE_VR_ROMA(7);
|
||||
|
||||
|
||||
private final int code;
|
||||
@@ -62,4 +67,8 @@ public enum VisualAngleMode implements IMogoMapVisualAngle {
|
||||
public boolean isMediumSight() {
|
||||
return code == MODE_MEDIUM_SIGHT.getCode();
|
||||
}
|
||||
|
||||
public boolean isRoma(){
|
||||
return code == MAP_STYLE_VR_ROMA.getCode();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,8 +63,6 @@ dependencies {
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':libraries:mogo-map-api')
|
||||
implementation project(':foudations:mogo-commons')
|
||||
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call') //todo 解除依赖
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -6,6 +6,7 @@ import android.graphics.Point;
|
||||
import android.util.Pair;
|
||||
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.map.center.CenterLine;
|
||||
import com.mogo.map.marker.AMapInfoWindowAdapter;
|
||||
@@ -41,6 +42,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.yycp.api.proto.SocketDownData;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -123,6 +125,24 @@ public class AMapWrapper implements IMogoMap {
|
||||
MarkerHelper.INSTANCE.updateBatchMarkerPositon(markerOptionsArrayList, false, FunctionBuildConfig.isBeautyMode ? 8.0f : 0f, 1, time, 1);
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
public void updateBatchAiMarkerPosition(HashMap<String, SocketDownData.CloudRoadDataProto> optionsArrayList) {
|
||||
if (!checkAMap()) {
|
||||
return;
|
||||
}
|
||||
ArrayList<MarkerSimpleData> markerOptionsArrayList = new ArrayList<>();
|
||||
optionsArrayList.forEach((s, trackedObject) -> {
|
||||
MarkerSimpleData markerOptions = ObjectUtils.fromAiData(trackedObject);
|
||||
if (markerOptions != null) {
|
||||
markerOptionsArrayList.add(markerOptions);
|
||||
}
|
||||
});
|
||||
long time = markerOptionsArrayList.get(0).getTime();
|
||||
// 最后一个参数,是否管理锚点的删除
|
||||
MarkerHelper.INSTANCE.updateBatchMarkerPositon(markerOptionsArrayList, false, FunctionBuildConfig.isBeautyMode ? 8.0f : 0f, 1, time, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String addPreVehicleModel(int type, int modelRes) {
|
||||
try {
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.map;
|
||||
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.location.Location;
|
||||
import android.view.View;
|
||||
|
||||
import com.mogo.eagle.core.data.map.CenterLine;
|
||||
@@ -15,11 +14,8 @@ import com.mogo.map.uicontroller.MapCameraPosition;
|
||||
import com.mogo.map.uicontroller.MapControlResult;
|
||||
import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -69,6 +65,13 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
return MapControlResult.ERROR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDebugMode(Boolean debugMode) {
|
||||
initDelegate();
|
||||
if (mDelegate != null) {
|
||||
mDelegate.setDebugMode(debugMode);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeMapVisualAngle(VisualAngleMode angelMode, MogoLatLng mogoLatLng) {
|
||||
@@ -79,6 +82,23 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRoamTrajectory(String trajectory) {
|
||||
initDelegate();
|
||||
if (mDelegate != null) {
|
||||
mDelegate.setRoamTrajectory(trajectory);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRomaMode(int mode) {
|
||||
initDelegate();
|
||||
if (mDelegate != null) {
|
||||
CallerLogger.INSTANCE.d(TAG, "set setRomaMode: " + mode);
|
||||
mDelegate.setRomaMode(mode);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisualAngleMode getCurrentMapVisualAngle() {
|
||||
initDelegate();
|
||||
@@ -228,15 +248,6 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void changeMyLocation(Location location) {
|
||||
initDelegate();
|
||||
if (mDelegate != null) {
|
||||
mDelegate.changeMyLocation(location);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCarLocked() {
|
||||
initDelegate();
|
||||
@@ -327,14 +338,6 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void syncLocation2Map(JSONObject data) {
|
||||
initDelegate();
|
||||
if (mDelegate != null) {
|
||||
mDelegate.syncLocation2Map(data);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
mDelegate = null;
|
||||
@@ -421,4 +424,28 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
mDelegate.setExtraGPSData(gnssInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIsDrawPointCloud(Boolean isDrawPointCloud) {
|
||||
initDelegate();
|
||||
if (mDelegate != null) {
|
||||
mDelegate.setIsDrawPointCloud(isDrawPointCloud);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointCloudSize(Float pointCloudSize) {
|
||||
initDelegate();
|
||||
if (mDelegate != null) {
|
||||
mDelegate.setPointCloudSize(pointCloudSize);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointCloudColor(String color) {
|
||||
initDelegate();
|
||||
if (mDelegate != null) {
|
||||
mDelegate.setPointCloudColor(color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.zhidaoauto.map.sdk.open.view.MapAutoView;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -90,6 +89,7 @@ public class MogoMapView extends MogoBaseMapView implements ILifeCycle {
|
||||
}
|
||||
|
||||
public void setExtraGPSData(MogoLocation gnssInfo) {
|
||||
|
||||
getMap().getUIController().setExtraGPSData(gnssInfo);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.yycp.api.proto.SocketDownData;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -29,17 +30,17 @@ public class MogoMarkerManager implements IMogoMarkerManager {
|
||||
private static volatile MogoMarkerManager sInstance;
|
||||
private Context mApplicationContext;
|
||||
|
||||
private MogoMarkerManager( Context context ) {
|
||||
if ( context != null ) {
|
||||
private MogoMarkerManager(Context context) {
|
||||
if (context != null) {
|
||||
mApplicationContext = context.getApplicationContext();
|
||||
}
|
||||
}
|
||||
|
||||
public static MogoMarkerManager getInstance( Context context ) {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( MogoMarkerManager.class ) {
|
||||
if ( sInstance == null ) {
|
||||
sInstance = new MogoMarkerManager( context );
|
||||
public static MogoMarkerManager getInstance(Context context) {
|
||||
if (sInstance == null) {
|
||||
synchronized (MogoMarkerManager.class) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new MogoMarkerManager(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,27 +52,27 @@ public class MogoMarkerManager implements IMogoMarkerManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoMarker addMarker( String tag, MogoMarkerOptions options ) {
|
||||
public IMogoMarker addMarker(String tag, MogoMarkerOptions options) {
|
||||
try {
|
||||
return MogoMap.getInstance().getMogoMap().addMarker( tag, options );
|
||||
} catch ( Exception e ) {
|
||||
return MogoMap.getInstance().getMogoMap().addMarker(tag, options);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List< IMogoMarker > addMarkers( String tag, ArrayList< MogoMarkerOptions > options, boolean moveToCenter ) {
|
||||
public List<IMogoMarker> addMarkers(String tag, ArrayList<MogoMarkerOptions> options, boolean moveToCenter) {
|
||||
try {
|
||||
return MogoMap.getInstance().getMogoMap().addMarkers( tag, options, moveToCenter );
|
||||
} catch ( Exception e ) {
|
||||
return MogoMap.getInstance().getMogoMap().addMarkers(tag, options, moveToCenter);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBatchMarkerPosition(HashMap<String,MessagePad.TrackedObject> optionsArrayList) {
|
||||
public void updateBatchMarkerPosition(HashMap<String, MessagePad.TrackedObject> optionsArrayList) {
|
||||
try {
|
||||
MogoMap.getInstance().getMogoMap().updateBatchMarkerPosition(optionsArrayList);
|
||||
} catch (Exception e) {
|
||||
@@ -79,6 +80,15 @@ public class MogoMarkerManager implements IMogoMarkerManager {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBatchAiMarkerPosition(HashMap<String, SocketDownData.CloudRoadDataProto> optionsArrayList) {
|
||||
try {
|
||||
MogoMap.getInstance().getMogoMap().updateBatchAiMarkerPosition(optionsArrayList);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String addPreVehicleModel(int type, int modelRes) {
|
||||
try {
|
||||
@@ -100,9 +110,9 @@ public class MogoMarkerManager implements IMogoMarkerManager {
|
||||
|
||||
|
||||
@Override
|
||||
public void removeMarkers( String tag ) {
|
||||
public void removeMarkers(String tag) {
|
||||
CallMarkersClearManager.INSTANCE.invokeClearAllMarkersOfTag(tag);
|
||||
MogoMarkersHandler.Companion.getMogoMarkersHandler().remove( tag );
|
||||
MogoMarkersHandler.Companion.getMogoMarkersHandler().remove(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -123,27 +133,27 @@ public class MogoMarkerManager implements IMogoMarkerManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inVisibleWithoutMarkers(String ...owner) {
|
||||
public void inVisibleWithoutMarkers(String... owner) {
|
||||
MogoMarkersHandler.Companion.getMogoMarkersHandler().inVisibleMarkers(owner);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List< IMogoMarker > getMarkers( String tag ) {
|
||||
return MogoMarkersHandler.Companion.getMogoMarkersHandler().getMarkers( tag );
|
||||
public List<IMogoMarker> getMarkers(String tag) {
|
||||
return MogoMarkersHandler.Companion.getMogoMarkersHandler().getMarkers(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map< String, List< IMogoMarker > > getAllMarkers() {
|
||||
public Map<String, List<IMogoMarker>> getAllMarkers() {
|
||||
return MogoMarkersHandler.Companion.getMogoMarkersHandler().getAllMarkers();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeMarkersExcept( String tag ) {
|
||||
MogoMarkersHandler.Companion.getMogoMarkersHandler().deleteAllExcept( tag );
|
||||
public void removeMarkersExcept(String tag) {
|
||||
MogoMarkersHandler.Companion.getMogoMarkersHandler().deleteAllExcept(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addRouteWay(Context context, MogoLatLng startPoint, MogoLatLng endPoint, List< MogoLatLng > wayPoints ) {
|
||||
public void addRouteWay(Context context, MogoLatLng startPoint, MogoLatLng endPoint, List<MogoLatLng> wayPoints) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,8 +2,6 @@ package com.mogo.map.uicontroller;
|
||||
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.location.Location;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import com.mogo.eagle.core.data.map.CenterLine;
|
||||
@@ -11,11 +9,8 @@ import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.zhidaoauto.map.sdk.open.MapAutoApi;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -25,8 +20,6 @@ import mogo.telematics.pad.MessagePad;
|
||||
*/
|
||||
public class AMapUIController implements IMogoMapUIController {
|
||||
|
||||
private static final String TAG = "AMapUIController";
|
||||
|
||||
private static volatile AMapUIController sInstance;
|
||||
|
||||
private IMogoMapUIController mClient;
|
||||
@@ -62,6 +55,13 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
return MapControlResult.ERROR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDebugMode(Boolean debugMode) {
|
||||
if (mClient != null) {
|
||||
mClient.setDebugMode(debugMode);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeMapVisualAngle(VisualAngleMode angelMode, MogoLatLng mogoLatLng) {
|
||||
if (mClient != null) {
|
||||
@@ -69,6 +69,20 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRoamTrajectory(String trajectory) {
|
||||
if (mClient != null) {
|
||||
mClient.setRoamTrajectory(trajectory);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRomaMode(int mode) {
|
||||
if (mClient != null) {
|
||||
mClient.setRomaMode(mode);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisualAngleMode getCurrentMapVisualAngle() {
|
||||
if (mClient != null) {
|
||||
@@ -200,12 +214,6 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeMyLocation(Location location) {
|
||||
if (mClient != null) {
|
||||
mClient.changeMyLocation(location);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCarLocked() {
|
||||
@@ -265,15 +273,20 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
|
||||
@Override
|
||||
public int getLimitSpeed(double lon, double lat, float angle) {
|
||||
return mClient.getLimitSpeed(lon, lat, angle);
|
||||
if(mClient!= null){
|
||||
return mClient.getLimitSpeed(lon, lat, angle);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CenterLine getCenterLineInfo(double lon, double lat, float angle) {
|
||||
return mClient.getCenterLineInfo(lon, lat, angle);
|
||||
if(mClient != null){
|
||||
return mClient.getCenterLineInfo(lon, lat, angle);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void rtkEnable(boolean enable) {
|
||||
if (mClient != null) {
|
||||
@@ -281,12 +294,6 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void syncLocation2Map(JSONObject data) {
|
||||
if (mClient != null) {
|
||||
mClient.syncLocation2Map(data);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stepInVrMode(boolean isDayMode) {
|
||||
@@ -361,4 +368,25 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
mClient.setExtraGPSData(gnssInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIsDrawPointCloud(Boolean isDrawPointCloud) {
|
||||
if (mClient != null) {
|
||||
mClient.setIsDrawPointCloud(isDrawPointCloud);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointCloudSize(Float pointCloudSize) {
|
||||
if (mClient != null) {
|
||||
mClient.setPointCloudSize(pointCloudSize);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointCloudColor(String color) {
|
||||
if (mClient != null) {
|
||||
mClient.setPointCloudColor(color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.yycp.api.proto.SocketDownData;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -117,6 +118,26 @@ public class ObjectUtils {
|
||||
return markerOptions;
|
||||
}
|
||||
|
||||
public static MarkerSimpleData fromAiData(SocketDownData.CloudRoadDataProto aiData) {
|
||||
if (aiData == null) {
|
||||
return null;
|
||||
}
|
||||
MarkerSimpleData markerOptions = null;
|
||||
try {
|
||||
markerOptions = new MarkerSimpleData();
|
||||
markerOptions.setId(aiData.getUuid().hashCode());
|
||||
markerOptions.setMarkerType(aiData.getType());
|
||||
markerOptions.setRotateAngle((float) aiData.getHeading());
|
||||
markerOptions.setLat(aiData.getWgslat());
|
||||
markerOptions.setLon(aiData.getWgslon());
|
||||
markerOptions.setTime(Double.valueOf(aiData.getSatelliteTime()).longValue());
|
||||
markerOptions.setColor("#00FF00FF");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return markerOptions;
|
||||
}
|
||||
|
||||
private static BitmapDescriptor getBitmapDescriptorFromMogo(MogoMarkerOptions options) {
|
||||
if (options == null) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user