[6.7.0] fix cherry pick 6.6.2
This commit is contained in:
@@ -176,6 +176,11 @@ object MapDataWrapper : IMogoData {
|
||||
return MapAutoApi.getTileID(lon, lat, 13) // 13为默认获取瓦片层级级别
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
override fun getCityCode(): Int? {
|
||||
return getHDCityCode(gdLocationClient.lastCityCode)
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过cityCode获取HDMap对应缓存城市
|
||||
*/
|
||||
@@ -187,8 +192,8 @@ object MapDataWrapper : IMogoData {
|
||||
val gdCityCode = gdLocationClient.lastCityCode
|
||||
i(M_MAP + TAG, "gdCityCode is:$gdCityCode")
|
||||
val id = getHDCityCode(gdCityCode)
|
||||
id?.let {
|
||||
MapDataApi.cacheHDDataByCity(it, object : OnHdDataDownByCityListener {
|
||||
if (id != null && id > 0) {
|
||||
MapDataApi.cacheHDDataByCity(id, object : OnHdDataDownByCityListener {
|
||||
override fun onMapHDDataCacheProgressByCity(id: Int, p: Double) {
|
||||
progress.invoke(id, p * 100)
|
||||
}
|
||||
@@ -197,7 +202,10 @@ object MapDataWrapper : IMogoData {
|
||||
result.invoke(id, state)
|
||||
}
|
||||
})
|
||||
}else{
|
||||
result.invoke(0, 0)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -305,13 +313,23 @@ object MapDataWrapper : IMogoData {
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
override fun getBusStation(routeList: ArrayList<LonLatPoint>, resultUnit:((MutableList<BusStation>) -> Unit)) {
|
||||
override fun getBusStation(
|
||||
routeList: ArrayList<LonLatPoint>,
|
||||
resultUnit: ((MutableList<BusStation>) -> Unit)
|
||||
) {
|
||||
val resultList = mutableListOf<BusStation>()
|
||||
MapDataApi.getBusStation(routeList, object : IResult<RoutePath> {
|
||||
override fun result(code: Int, result: RoutePath?) {
|
||||
result?.steps?.forEach {
|
||||
it?.busStations.forEach {
|
||||
val busStation = BusStation(it.busStationPoints, it.id.toLong() , it.roadId, it.type, -1, -1)
|
||||
val busStation = BusStation(
|
||||
it.busStationPoints,
|
||||
it.id.toLong(),
|
||||
it.roadId,
|
||||
it.type,
|
||||
-1,
|
||||
-1
|
||||
)
|
||||
resultList.add(busStation)
|
||||
}
|
||||
}
|
||||
@@ -332,7 +350,15 @@ object MapDataWrapper : IMogoData {
|
||||
override fun result(code: Int, result: RoadCross?) {
|
||||
try {
|
||||
Logger.d(TAG, "getCrossRoad --- 1 - 1 ---")
|
||||
temp.set(CrossRoad(result?.status ?: 0, result?.tile_id ?: "", result?.cross_id ?: "", result?.tile_id_end ?: "", result?.cross_id_end ?: ""))
|
||||
temp.set(
|
||||
CrossRoad(
|
||||
result?.status ?: 0,
|
||||
result?.tile_id ?: "",
|
||||
result?.cross_id ?: "",
|
||||
result?.tile_id_end ?: "",
|
||||
result?.cross_id_end ?: ""
|
||||
)
|
||||
)
|
||||
} finally {
|
||||
latch.countDown()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user