云端下发定位改为gps,绘制侧传参为gps定位,不需要地图侧转一次,setGps(true)
如果传参为高德定位,setGps(false),地图侧转高德定位为GPS再绘制
This commit is contained in:
@@ -74,7 +74,7 @@ public class CustomMapApiBuilder implements IMogoMapApiBuilder {
|
|||||||
Log.d(TAG, "setDebugMode==true");
|
Log.d(TAG, "setDebugMode==true");
|
||||||
|
|
||||||
MapParams mapParams = MapParams.Companion.init();
|
MapParams mapParams = MapParams.Companion.init();
|
||||||
mapParams.setDebugMode(false)
|
mapParams.setDebugMode(true)
|
||||||
//.setDataFileSource(1) //todo 1-使用本地地图数据,0-使用在线地图数据
|
//.setDataFileSource(1) //todo 1-使用本地地图数据,0-使用在线地图数据
|
||||||
.setCoordinateType(MapParams.COORDINATETYPE_GCJ02)
|
.setCoordinateType(MapParams.COORDINATETYPE_GCJ02)
|
||||||
.setPerspectiveMode(MapParams.MAP_PERSPECTIVE_2D)
|
.setPerspectiveMode(MapParams.MAP_PERSPECTIVE_2D)
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
|
|||||||
.object(markerShowEntity)
|
.object(markerShowEntity)
|
||||||
.latitude(markerShowEntity.getMarkerLocation().getLat())
|
.latitude(markerShowEntity.getMarkerLocation().getLat())
|
||||||
.longitude(markerShowEntity.getMarkerLocation().getLon())
|
.longitude(markerShowEntity.getMarkerLocation().getLon())
|
||||||
.setGps(false);
|
.setGps(true);
|
||||||
IMarkerView iMarkerView = MapMarkerAdapter.getMarkerView(mContext, markerShowEntity, options);
|
IMarkerView iMarkerView = MapMarkerAdapter.getMarkerView(mContext, markerShowEntity, options);
|
||||||
options.icon3DRes(getModelRes(modeResType)); //TODO
|
options.icon3DRes(getModelRes(modeResType)); //TODO
|
||||||
options.anchorColor("#FB3C3CFF");
|
options.anchorColor("#FB3C3CFF");
|
||||||
@@ -124,7 +124,7 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
|
|||||||
.latitude(location.getLat())
|
.latitude(location.getLat())
|
||||||
.longitude(location.getLon())
|
.longitude(location.getLon())
|
||||||
.set3DMode(true)
|
.set3DMode(true)
|
||||||
.setGps(false)
|
.setGps(true)
|
||||||
.controlAngle(true)
|
.controlAngle(true)
|
||||||
.icon3DRes(getModelRes(type))
|
.icon3DRes(getModelRes(type))
|
||||||
.anchorColor("#FB3C3CFF")
|
.anchorColor("#FB3C3CFF")
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class MoGoPersonWarnPolylineManager implements IMoGoPersonWarnPolylineMan
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 连接线参数
|
// 连接线参数
|
||||||
MogoPolylineOptions options = new MogoPolylineOptions().setGps(false);
|
MogoPolylineOptions options = new MogoPolylineOptions().setGps(true);
|
||||||
|
|
||||||
// 渐变色
|
// 渐变色
|
||||||
List<Integer> colors = new ArrayList<>();
|
List<Integer> colors = new ArrayList<>();
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class MoGoWarnPolylineManager implements IMoGoWarnPolylineManager {
|
|||||||
|
|
||||||
// 连接线参数
|
// 连接线参数
|
||||||
MogoPolylineOptions options = new MogoPolylineOptions()
|
MogoPolylineOptions options = new MogoPolylineOptions()
|
||||||
.setGps(false);
|
.setGps(true);
|
||||||
List<Integer> colors = new ArrayList<>();
|
List<Integer> colors = new ArrayList<>();
|
||||||
|
|
||||||
if (info.isHasStopLines() == true) {
|
if (info.isHasStopLines() == true) {
|
||||||
@@ -50,7 +50,7 @@ public class MoGoWarnPolylineManager implements IMoGoWarnPolylineManager {
|
|||||||
colors.add(0x0DE32F46);
|
colors.add(0x0DE32F46);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.d(V2XConst.LOG_NAME_WARN, "MoGoWarnPolylineManager roadWidth = " + info.getWidth());
|
Log.d("V2XWarningMarker", "MoGoWarnPolylineManager roadWidth = " + info.getWidth());
|
||||||
// 线条粗细,渐变,渐变色值
|
// 线条粗细,渐变,渐变色值
|
||||||
options.width(info.getWidth() == 0.0 ? 60 : info.getWidth()).useGradient(true).colorValues(colors);
|
options.width(info.getWidth() == 0.0 ? 60 : info.getWidth()).useGradient(true).colorValues(colors);
|
||||||
List<MogoLatLng> locations = info.getLocations();
|
List<MogoLatLng> locations = info.getLocations();
|
||||||
|
|||||||
@@ -1,29 +1,19 @@
|
|||||||
{
|
{
|
||||||
"type": 1,
|
"type": 1,
|
||||||
"lat": 26.87912015,
|
"lat": 26.851993861219782,
|
||||||
"lon": 112.56885373,
|
"lon": 112.57065318116094,
|
||||||
"distance": 2.678,
|
"distance": 5.89,
|
||||||
"collisionLat": 26.8791769,
|
"collisionLat": 26.85198163866211,
|
||||||
"collisionLon": 112.56896496,
|
"collisionLon": 112.57059540184451,
|
||||||
"stopLines": [
|
"stopLines": [
|
||||||
{
|
|
||||||
"lat": 26.8791769,
|
|
||||||
"lon": 112.56896496
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"lat": 26.879153,
|
|
||||||
"lon": 112.568997
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"from": 1,
|
"from": 1,
|
||||||
"angle": 240,
|
"angle": 240,
|
||||||
"direction": 1,
|
"direction": 1,
|
||||||
"speed": 11.108121,
|
"speed": 11.108121,
|
||||||
"targetColor": "#FF4040",
|
|
||||||
"stopLineDistance": 60,
|
"stopLineDistance": 60,
|
||||||
"warningContent": "小心行人",
|
"warningContent": "小心行人",
|
||||||
"heading": 0,
|
"heading": 76,
|
||||||
"showTime": 3,
|
"showTime": 3,
|
||||||
"roadwidth": 4.0
|
"roadwidth": 4.0
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user