[6.8.0][Feat]新增车外语音播报功能

This commit is contained in:
chenfufeng
2024-11-19 16:42:08 +08:00
parent 241ba6feb6
commit 6794d25894
4 changed files with 52 additions and 19 deletions

View File

@@ -1699,20 +1699,22 @@ class TravelRealityView @JvmOverloads constructor(
super.invokeOchInfo(ochInfo)
Log.d(TAG, "invokeOchInfo$ochInfo")
if (ochInfo.type == 0) {
val locList = ochInfo.latLonList
if (locList.isEmpty() || locList.size < 2) {
mStartLatLng = null
mEndLatLng = null
UiThreadHandler.post {
hideStartEndMarker()
val locationList = ochInfo.latLonList
locationList?.let { locList->
if (locList.isEmpty() || locList.size < 2) {
mStartLatLng = null
mEndLatLng = null
UiThreadHandler.post {
hideStartEndMarker()
}
} else {
// 设置开始结束Marker位置
mStartLatLng = LatLng(locList[0].latitude, locList[0].longitude)
mEndLatLng = LatLng(locList[1].latitude, locList[1].longitude)
}
if (!isPlayingAnim) {
drawStartAndEnd()
}
} else {
// 设置开始结束Marker位置
mStartLatLng = LatLng(locList[0].latitude, locList[0].longitude)
mEndLatLng = LatLng(locList[1].latitude, locList[1].longitude)
}
if (!isPlayingAnim) {
drawStartAndEnd()
}
}
}