[8.2.2][fix]解决多次到站的问题
This commit is contained in:
@@ -72,13 +72,20 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
/**
|
||||
* 起始站点
|
||||
*/
|
||||
@Volatile
|
||||
private var startStation: BusStationBean? = null
|
||||
|
||||
/**
|
||||
* 结束站点
|
||||
*/
|
||||
@Volatile
|
||||
private var endStation: BusStationBean? = null
|
||||
|
||||
/**
|
||||
* 上次到站的siteId
|
||||
*/
|
||||
@Volatile
|
||||
var lastArrivedSiteId = -1
|
||||
|
||||
/**
|
||||
* 和[autopilotId]相关 默认为true
|
||||
@@ -155,7 +162,8 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
private val mMapLocationListener = object : IMoGoChassisLocationGCJ02Listener {
|
||||
override fun onChassisLocationGCJ02(mogoLocation: MogoLocation?) {
|
||||
if (null == mogoLocation) return
|
||||
getStations { start, end ->
|
||||
getStations { _, end ->
|
||||
if (end.siteId == lastArrivedSiteId) return@getStations
|
||||
val startLon = end.gcjLon
|
||||
val startLat = end.gcjLat
|
||||
val distance = CoordinateUtils.calculateLineDistance(
|
||||
|
||||
Reference in New Issue
Block a user