[6.0.0]
[bugfix] [bus 轨迹计算]
This commit is contained in:
@@ -50,7 +50,7 @@ object DebugDataDispatch {
|
||||
when (type) {
|
||||
globalPathMock -> {
|
||||
sourceFilePath?.let {
|
||||
loadRawPoints(ROOT_PATH+it,it)
|
||||
loadRawPoints(ROOT_PATH+it)
|
||||
}
|
||||
}
|
||||
locationMock -> {
|
||||
@@ -112,7 +112,7 @@ object DebugDataDispatch {
|
||||
}
|
||||
}
|
||||
|
||||
fun loadRawPoints(path:String,name:String) {
|
||||
fun loadRawPoints(path:String) {
|
||||
val inputStream = FileInputStream(path)
|
||||
val reader = BufferedReader(InputStreamReader(inputStream))
|
||||
val jsonStr = StringBuilder()
|
||||
@@ -137,7 +137,8 @@ object DebugDataDispatch {
|
||||
newBuilder.addWayPoints(locationBuilder)
|
||||
}
|
||||
try {
|
||||
newBuilder.lineId = name.toLong()
|
||||
val file = File(path)
|
||||
newBuilder.lineId = file.name.toLong()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
@@ -179,7 +179,14 @@ object TrajectoryAndDistanceManager: IMoGoPlanningRottingListener{
|
||||
}
|
||||
}else{
|
||||
resetStation()
|
||||
cleanRoutePoints()
|
||||
if (this.lineId == 0L || this.lineId == null) {
|
||||
// 兼容老MAP 不返回轨迹id lineID
|
||||
}else {
|
||||
if (this.lineId != lineId) {// bus 切换站点不会切线路
|
||||
cleanRoutePoints()
|
||||
TrajectoryCache.deleteCatcheFile()
|
||||
}
|
||||
}
|
||||
stationDistance.clear()
|
||||
}
|
||||
this.endStationInfo.stationPoint = endStationInfo
|
||||
|
||||
Reference in New Issue
Block a user