merge
This commit is contained in:
@@ -94,7 +94,7 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
|
||||
MogoLatLng stopLineNew = Trigonometric.getNewLocation(data.getStopLines().get(1), 5, 180);
|
||||
MogoLatLng newLocation = Trigonometric.getNewLocation(mogoLatLng, 5, 180);
|
||||
|
||||
IMogoMarker marker = drawMarker(markerShowEntity);
|
||||
IMogoMarker marker = drawMarker(markerShowEntity, modeResType(data.getType()));
|
||||
//识别物
|
||||
marker.addDynamicAnchorPosition(new MogoLatLng(
|
||||
data.getDirection() == 1 ? data.getStopLines().get(1).lat : data.getCollisionLat(),
|
||||
@@ -111,14 +111,31 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
|
||||
|
||||
}
|
||||
|
||||
//根据识别物类型 (行人0/自行车1/摩托车2/小汽车3/公交车4)获取3D模型(对应查看getModelRes)
|
||||
private int modeResType(int dataType) {
|
||||
switch (dataType) {
|
||||
case 0:
|
||||
return 1;
|
||||
case 1:
|
||||
return 2;
|
||||
case 2:
|
||||
return 4;
|
||||
case 3:
|
||||
return 3;
|
||||
case 4:
|
||||
return 6;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
public IMogoMarker drawMarker(MarkerShowEntity markerShowEntity) {
|
||||
|
||||
public IMogoMarker drawMarker(MarkerShowEntity markerShowEntity, int modeResType) {
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.object(markerShowEntity)
|
||||
.latitude(markerShowEntity.getMarkerLocation().getLat())
|
||||
.longitude(markerShowEntity.getMarkerLocation().getLon());
|
||||
IMarkerView iMarkerView = MapMarkerAdapter.getMarkerView(mContext, markerShowEntity, options);
|
||||
options.icon3DRes(getModelRes(1)); //TODO
|
||||
options.icon3DRes(getModelRes(modeResType)); //TODO
|
||||
|
||||
options.anchorColor("#FB3C3CFF"); //红色#FF3036 蓝色:#256BFF
|
||||
IMogoMarker marker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(mContext).addMarker(markerShowEntity.getMarkerType(), options);
|
||||
|
||||
@@ -10,14 +10,13 @@ import org.json.JSONObject;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public
|
||||
/*
|
||||
* @author congtaowang
|
||||
* @since 2020/12/14
|
||||
*
|
||||
* 实时坐标数据处理中心
|
||||
*/
|
||||
class SnapshotLocationController {
|
||||
/*
|
||||
* @author congtaowang
|
||||
* @since 2020/12/14
|
||||
*
|
||||
* 实时坐标数据处理中心
|
||||
*/
|
||||
public class SnapshotLocationController {
|
||||
|
||||
private static final String TAG = "SnapshotLocationController";
|
||||
|
||||
@@ -141,7 +140,7 @@ class SnapshotLocationController {
|
||||
mLastLocationInfo = null;
|
||||
}
|
||||
}
|
||||
Logger.d(TAG, "upload loc size = %s", list == null ? 0 : list.size());
|
||||
//Logger.d( TAG, "upload loc size = %s", list == null ? 0 : list.size() );
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -151,7 +150,7 @@ class SnapshotLocationController {
|
||||
* @return 精度
|
||||
*/
|
||||
public int getDataAccuracy() {
|
||||
Logger.d(TAG, "upload loc accuracy = %s", mDataAccuracy);
|
||||
//Logger.d( TAG, "upload loc accuracy = %s", mDataAccuracy );
|
||||
return mDataAccuracy;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user