打点option传gps字段

This commit is contained in:
liujing
2021-04-28 21:01:50 +08:00
parent d577daf150
commit 47bb176dff
5 changed files with 49 additions and 31 deletions

View File

@@ -133,10 +133,10 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
MogoMarkerOptions options = new MogoMarkerOptions()
.object(markerShowEntity)
.latitude(markerShowEntity.getMarkerLocation().getLat())
.longitude(markerShowEntity.getMarkerLocation().getLon());
.longitude(markerShowEntity.getMarkerLocation().getLon())
.setGps(true);
IMarkerView iMarkerView = MapMarkerAdapter.getMarkerView(mContext, markerShowEntity, options);
options.icon3DRes(getModelRes(modeResType)); //TODO
options.anchorColor("#FB3C3CFF"); //红色#FF3036 蓝色:#256BFF
IMogoMarker marker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(mContext).addMarker(markerShowEntity.getMarkerType(), options);
iMarkerView.setMarker(marker);
@@ -150,6 +150,7 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
.latitude(location.getLat())
.longitude(location.getLon())
.set3DMode(true)
.setGps(true)
.controlAngle(true)
.icon3DRes(getModelRes(type))
.anchorColor("#FB3C3CFF")
@@ -208,10 +209,10 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
MogoMarkerOptions options = new MogoMarkerOptions()
.object(markerShowEntity)
.latitude(markerShowEntity.getMarkerLocation().getLat())
.longitude(markerShowEntity.getMarkerLocation().getLon());
.longitude(markerShowEntity.getMarkerLocation().getLon())
.setGps(true);
IMarkerView iMarkerView = MapMarkerAdapter.getMarkerView(mContext, markerShowEntity, options);
options.icon3DRes(getModelRes(9));
options.anchorColor("#FB3C3CFF");
IMogoMarker marker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(mContext).addMarker(markerShowEntity.getMarkerType(), options);
iMarkerView.setMarker(marker);

View File

@@ -37,7 +37,8 @@ public class MoGoStopPolylineManager implements IMoGoStopPolylineManager {
}
// 连接线参数
MogoPolylineOptions options = new MogoPolylineOptions();
MogoPolylineOptions options = new MogoPolylineOptions()
.setGps(true);
List<Integer> colors = new ArrayList<>();
colors.add(0x0DE32F46);
colors.add(0xD9E32F46);

View File

@@ -41,7 +41,8 @@ public class MoGoWarnPolylineManager implements IMoGoWarnPolylineManager {
}
// 连接线参数
MogoPolylineOptions options = new MogoPolylineOptions();
MogoPolylineOptions options = new MogoPolylineOptions()
.setGps(true);
List<Integer> colors = new ArrayList<>();
if (info.getDirection() == ALERT_THE_FRONT_CRASH_WARNING_TOP) {
@@ -56,7 +57,6 @@ public class MoGoWarnPolylineManager implements IMoGoWarnPolylineManager {
Log.d(V2XConst.LOG_NAME_WARN, "MoGoWarnPolylineManager roadWidth = " + info.getWidth());
// 线条粗细,渐变,渐变色值
// 当前车辆位置
options.width(info.getWidth() == 0.0 ? 60 : info.getWidth()).useGradient(true).colorValues(colors);
List<MogoLatLng> locations = info.getLocations();
for (int i = 0; i < locations.size(); i++) {