Merge branch 'refs/heads/dev_robotaxi-d_240912_6.7.0' into dev_robotaxi-d_240912_6.7.2_local
This commit is contained in:
@@ -228,6 +228,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
@Volatile
|
||||
private var isSmallMap: Boolean = true
|
||||
private var iconRes = R.drawable.small_map_car
|
||||
|
||||
@Volatile
|
||||
private var globalPathResp: MessagePad.GlobalPathResp? = null
|
||||
private val mCoordinatesLatLng: MutableList<LatLng> = ArrayList()
|
||||
@@ -338,6 +339,8 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
hideSmallCarMarker()
|
||||
// 显示行程总览地图样式
|
||||
changeMapSettings(false)
|
||||
// 绘制自车
|
||||
mLocation?.let { drawCarMarker(it) }
|
||||
val globalPath = reqData
|
||||
if (!globalPath.isNullOrEmpty()) {
|
||||
handleGlobalPath(globalPath)
|
||||
@@ -455,7 +458,12 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
// 加载自定义样式
|
||||
val customMapStyleOptions1 = CustomMapStyleOptions()
|
||||
.setEnable(true)
|
||||
.setStyleData(MapAssetStyleUtils.getAssetsStyle(context, "over_view_style.data"))
|
||||
.setStyleData(
|
||||
MapAssetStyleUtils.getAssetsStyle(
|
||||
context,
|
||||
"over_view_style.data"
|
||||
)
|
||||
)
|
||||
.setStyleExtraData(
|
||||
MapAssetStyleUtils.getAssetsExtraStyle(
|
||||
context,
|
||||
@@ -489,12 +497,14 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
if (loc.latitude.toInt() == 0 || loc.longitude.toInt() == 0) {
|
||||
moveMapCamera(CameraUpdateFactory.zoomTo(17f))
|
||||
} else {
|
||||
moveMapCamera(CameraUpdateFactory.newLatLngZoom(
|
||||
coordinateConverterWgsToGcj(
|
||||
loc.latitude,
|
||||
loc.longitude
|
||||
), 14f
|
||||
))
|
||||
moveMapCamera(
|
||||
CameraUpdateFactory.newLatLngZoom(
|
||||
coordinateConverterWgsToGcj(
|
||||
loc.latitude,
|
||||
loc.longitude
|
||||
), 14f
|
||||
)
|
||||
)
|
||||
}
|
||||
//设置地图的样式
|
||||
mAMap?.uiSettings?.let {
|
||||
@@ -687,10 +697,12 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
optionList.add(
|
||||
MarkerOptions().apply {
|
||||
icon(BitmapDescriptorFactory.fromResource(startPointDrawable))
|
||||
position(coordinateConverterWgsToGcj(
|
||||
globalData[0].lat,
|
||||
globalData[0].lon
|
||||
))
|
||||
position(
|
||||
coordinateConverterWgsToGcj(
|
||||
globalData[0].lat,
|
||||
globalData[0].lon
|
||||
)
|
||||
)
|
||||
}
|
||||
)
|
||||
val endOption = MarkerOptions()
|
||||
@@ -737,7 +749,8 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
)
|
||||
key = "${eventBean.lon},${eventBean.lat}"
|
||||
if (distance >= 10 || eventPointMap.contains(key)) {
|
||||
CallerLogger.d("$M_MAP$TAG",
|
||||
CallerLogger.d(
|
||||
"$M_MAP$TAG",
|
||||
"道路事件:点(${key})到线段${index}-${index + 1}的距离为:${distance}米"
|
||||
)
|
||||
return@forEach
|
||||
@@ -752,7 +765,10 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
listener?.onDraw(eventDrawMap.values.toList(), true)
|
||||
CallerLogger.d("$M_MAP$TAG", "过滤掉的事件个数为:${eventList.size - eventOptionsList.size}")
|
||||
CallerLogger.d(
|
||||
"$M_MAP$TAG",
|
||||
"过滤掉的事件个数为:${eventList.size - eventOptionsList.size}"
|
||||
)
|
||||
// 事件不足3个则用路口设备补齐
|
||||
completeQuantity(roadEvents)
|
||||
// 绘制道路事件
|
||||
@@ -1084,7 +1100,8 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
)
|
||||
key = "${deviceBean.lon},${deviceBean.lat}"
|
||||
if (distance >= 10 || devicePointMap.contains(key)) {
|
||||
CallerLogger.d("$M_MAP$TAG",
|
||||
CallerLogger.d(
|
||||
"$M_MAP$TAG",
|
||||
"路口设备:点(${key})到线段${index}-${index + 1}的距离为:${distance}米"
|
||||
)
|
||||
return@loop
|
||||
@@ -1398,10 +1415,8 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
gnssInfo?.let {
|
||||
if (!isSmallMap) {
|
||||
mLocation = it
|
||||
if (isMapLoaded) {
|
||||
// 绘制自车
|
||||
drawCarMarker(it)
|
||||
}
|
||||
// 绘制自车
|
||||
drawCarMarker(it)
|
||||
} else {
|
||||
drawSmallMapMarker(it)
|
||||
}
|
||||
@@ -1563,7 +1578,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
private fun drawSmallMapMarker(mogoLocation: MogoLocation) {
|
||||
mLocation = mogoLocation
|
||||
if (mSmallCarMarker == null) {
|
||||
mSmallCarMarker = mAMap?.addMarker(
|
||||
mSmallCarMarker = mAMap?.addMarker(
|
||||
MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(iconRes))
|
||||
.anchor(0.5f, 0.5f)
|
||||
@@ -1709,6 +1724,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
realDrawCar(this)
|
||||
}
|
||||
}
|
||||
|
||||
HIDE_CAR_MARKER -> {
|
||||
removeMessages(HIDE_CAR_MARKER)
|
||||
if (isMapDestroyed) return
|
||||
@@ -1888,7 +1904,10 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
it.isClickable = false
|
||||
}
|
||||
}
|
||||
CallerLogger.d("$M_MAP$TAG", "计算到绘制事件耗时为:${System.currentTimeMillis() - testTime}")
|
||||
CallerLogger.d(
|
||||
"$M_MAP$TAG",
|
||||
"计算到绘制事件耗时为:${System.currentTimeMillis() - testTime}"
|
||||
)
|
||||
}
|
||||
|
||||
private fun realClearEventMarkers() {
|
||||
|
||||
Reference in New Issue
Block a user