[6.5.0] feat: 增加公交站点管理类;

This commit is contained in:
aibingbing
2024-06-28 19:36:31 +08:00
parent 6ff58cf654
commit 915547f5e6
5 changed files with 182 additions and 8 deletions

View File

@@ -1,8 +1,10 @@
package com.mogo.map
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.map.entities.BusStation
import com.mogo.map.entities.Lane
import com.mogo.map.entities.RoadInfo
import com.zhidaoauto.map.data.point.LonLatPoint
import com.zhidaoauto.map.data.road.CenterLine
interface IMogoData {
@@ -54,7 +56,13 @@ interface IMogoData {
/**
* 获取道路宽度
*/
fun getRoadWidth(lon: Double, lat: Double, angle: Float, isGpsLocation: Boolean, isRTK: Boolean): Float
fun getRoadWidth(
lon: Double,
lat: Double,
angle: Float,
isGpsLocation: Boolean,
isRTK: Boolean
): Float
/**
* 获取行车方向
@@ -75,17 +83,24 @@ interface IMogoData {
/**
* 通过cityCode,缓存城市HDMap
*/
fun cacheHDDataByCity(progress:((cityId: Int, progress: Double) -> Unit), result:((cityId: Int, state: Int) -> Unit))
fun cacheHDDataByCity(
progress: ((cityId: Int, progress: Double) -> Unit),
result: ((cityId: Int, state: Int) -> Unit)
)
/**
* 通过经纬度信息缓存城市HDMap
*/
fun cacheHDDataByCityByLonLat(location: MogoLocation, progress:((cityId: Int, progress: Double) -> Unit), result:((cityId: Int, state: Int) -> Unit))
fun cacheHDDataByCityByLonLat(
location: MogoLocation,
progress: ((cityId: Int, progress: Double) -> Unit),
result: ((cityId: Int, state: Int) -> Unit)
)
/**
* 当前城市离线数据是否已缓存
*/
fun isCityDataCached(cache:((Boolean) -> Unit))
fun isCityDataCached(cache: ((Boolean) -> Unit))
/**
* 取消下载 城市HDMap
@@ -101,4 +116,9 @@ interface IMogoData {
* 根据瓦片Id和道路Id获取车道数据
*/
fun getLaneInfo(tileId: Long, roadId: Int): List<Lane>
/**
* 获取公交站点集合
*/
fun getBusStation(routeList: ArrayList<LonLatPoint>): List<BusStation>
}

View File

@@ -0,0 +1,16 @@
package com.mogo.map.entities
data class BusStation(
var busStationPoints: List<com.zhidaoauto.map.data.point.LonLatPoint>,
var id: Int,
var roadId: Int,
var type: Int
) {
override fun toString(): String {
return "BusStation(busStationPoints=$busStationPoints, id=$id, roadId=$roadId, type=$type)"
}
fun getBusStationId(): String {
return "${id}_${roadId}"
}
}