[6.5.0][Feat]更新高精地图版本
This commit is contained in:
@@ -81,8 +81,8 @@ MOGO_LOCATION_VERSION=1.4.7.23
|
||||
MOGO_TELEMATIC_VERSION=1.4.7.23
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=3.4.0.3
|
||||
MAP_SDK_DATA_VERSION=1.0.0.7
|
||||
MAP_SDK_VERSION=3.4.0.5
|
||||
MAP_SDK_DATA_VERSION=1.0.0.9
|
||||
MAP_SDK_OPERATION_VERSION=1.1.4.1
|
||||
# websocket
|
||||
WEBSOCKET_VERSION=1.1.7
|
||||
|
||||
@@ -45,6 +45,7 @@ class MapBox {
|
||||
dis: Float,
|
||||
isCancel: Boolean = false
|
||||
)
|
||||
external fun llaGetBusStation(trajectorys : DoubleArray,isCancel: Boolean = false)
|
||||
external fun llaGetRoutePath(trajectorys : DoubleArray,isCancel: Boolean = false)
|
||||
|
||||
external fun updateCacheFile(isCancel: Boolean = false)
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.zhidaoauto.map.data.road.RoadRect
|
||||
import com.zhidaoauto.map.data.road.RoadRectInfos
|
||||
import com.zhidaoauto.map.data.road.RoadSign
|
||||
import com.zhidaoauto.map.data.road.RoadSignPostion
|
||||
import com.zhidaoauto.map.data.road.RouteBusStation
|
||||
import com.zhidaoauto.map.data.road.RouteCamera
|
||||
import com.zhidaoauto.map.data.road.RouteLane
|
||||
import com.zhidaoauto.map.data.road.RoutePath
|
||||
@@ -1297,6 +1298,84 @@ class RoadHelper private constructor() {
|
||||
}
|
||||
}
|
||||
|
||||
fun getBusStation(routeList : ArrayList<LonLatPoint> , isCanCancel: Boolean,call:IResult<RoutePath>):String{
|
||||
var key = StringBuffer("llaGetBusStation_")
|
||||
for(lonlat in routeList){
|
||||
key.append("${lonlat.longitude.toTenDecimalsStr()}_${lonlat.latitude.toTenDecimalsStr()}_")
|
||||
}
|
||||
key.append("${RoadResultController.CANCELTAG}${isCanCancel}")
|
||||
RoadResultController.instance.addRoadResultListener(key.toString(),object :IRoadData{
|
||||
override fun result(code: Int, result: ByteArray?) {
|
||||
if (CompileConfig.DEBUG) {
|
||||
Log.d(TAG, "roadop--getRouteInfo--code:${code},result: $result")
|
||||
}
|
||||
if (result?.isEmpty() == true) {
|
||||
call.result(1, null)
|
||||
return
|
||||
}
|
||||
result?.let {
|
||||
CommonController.instance.scope?.launch(Dispatchers.IO) {
|
||||
val buf = ByteBufferHelper.bytes2ByteBuffer(result)
|
||||
buf?.let {
|
||||
val routePath = RoutePath()
|
||||
val list = ArrayList<RouteStep>()
|
||||
val size = buf.int
|
||||
for(i in 0 until size){
|
||||
val routeStep = RouteStep()
|
||||
routeStep.id = buf.long.toInt()
|
||||
routeStep.tileId = buf.int
|
||||
routeStep.type = buf.int
|
||||
routeStep.name = ByteBufferHelper.buf2Str(buf)?:""
|
||||
routeStep.limitSpeed = buf.int
|
||||
|
||||
var busStations = ArrayList<RouteBusStation>()
|
||||
val busStation_size = buf.int
|
||||
for(o in 0 until busStation_size){
|
||||
val routeBusStation = RouteBusStation()
|
||||
routeBusStation.id = buf.int
|
||||
routeBusStation.type = buf.int
|
||||
routeBusStation.roadId = buf.int
|
||||
val busStation_pts = buf.int
|
||||
val busStationPoints = ArrayList<LonLatPoint>()
|
||||
for(p in 0 until busStation_pts step 2){
|
||||
val lonLatPoint = LonLatPoint(buf.long /1e8, buf.long /1e8)
|
||||
busStationPoints.add(lonLatPoint)
|
||||
}
|
||||
routeBusStation.busStationPoints = busStationPoints
|
||||
busStations.add(routeBusStation)
|
||||
}
|
||||
routeStep.busStations = busStations
|
||||
|
||||
list.add(routeStep)
|
||||
}
|
||||
|
||||
if(list.isNotEmpty()){
|
||||
routePath.steps = list
|
||||
if (CompileConfig.DEBUG) {
|
||||
Log.d(TAG, "roadop--getRouteInfo--routePath:${routePath}")
|
||||
}
|
||||
withContext(Dispatchers.Main){
|
||||
call.result(0, routePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}?:{
|
||||
call.result(1,null)
|
||||
}
|
||||
}
|
||||
})
|
||||
val data = MapTools.listToArray(routeList,false)
|
||||
try {
|
||||
mapBox.llaGetBusStation(data,isCanCancel)
|
||||
}catch (e: Exception){
|
||||
if (CompileConfig.DEBUG) {
|
||||
Log.e(TAG, e.toString())
|
||||
}
|
||||
}
|
||||
return key.toString()
|
||||
}
|
||||
|
||||
fun getRouteInfo(routeList : ArrayList<LonLatPoint> , isCanCancel: Boolean,call:IResult<RoutePath>):String{
|
||||
var key = StringBuffer("llaGetRoutePath_")
|
||||
for(lonlat in routeList){
|
||||
|
||||
@@ -573,6 +573,10 @@ object MapDataApi {
|
||||
return RoadHelper.getInstance()?.isInRoadSideFenceRegion(lon, lat, isCanCancel, call)
|
||||
}
|
||||
|
||||
fun getBusStation(routeList: ArrayList<LonLatPoint>, call: IResult<RoutePath>, isCanCancel: Boolean = false): String? {
|
||||
return RoadHelper.getInstance()?.getBusStation(routeList, isCanCancel, call)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取路线信息
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user