133 lines
3.1 KiB
Kotlin
133 lines
3.1 KiB
Kotlin
package com.mogo.map
|
||
|
||
import com.mogo.eagle.core.data.map.MogoLocation
|
||
import com.mogo.map.entities.BusStation
|
||
import com.mogo.map.entities.CrossRoad
|
||
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 {
|
||
|
||
fun setDebugMode(debugMode: Boolean)
|
||
|
||
/**
|
||
* 获取车道中心线数据
|
||
* @param lon 经度
|
||
* @param lat 纬度
|
||
* @param angle 角度
|
||
* @param call 回调(主线程)
|
||
*/
|
||
fun getCenterLineInfo(lon: Double, lat: Double, angle: Float, call: ((CenterLine?) -> Unit))
|
||
|
||
/**
|
||
* 按距离获取道路数据
|
||
* @param lon 经度
|
||
* @param lat 纬度
|
||
* @param angle 角度
|
||
* @param call 回调(主线程)
|
||
*/
|
||
fun getCenterLineRangeInfo(
|
||
lon: Double,
|
||
lat: Double,
|
||
angle: Float,
|
||
distance: Float,
|
||
call: ((CenterLine?) -> Unit)
|
||
)
|
||
|
||
/**
|
||
* 获取车道限速
|
||
* @param lon 经度
|
||
* @param lat 纬度
|
||
* @param angle 角度
|
||
* @param call 回调(主线程)
|
||
*/
|
||
fun getLimitSpeed(lon: Double, lat: Double, angle: Float, call: ((Int) -> Unit))
|
||
|
||
/**
|
||
* 获取道路角度
|
||
* @param lon 经度
|
||
* @param lat 纬度
|
||
* @param angle 角度
|
||
* @param call 回调(主线程)
|
||
*/
|
||
fun getRoadAngle(lon: Double, lat: Double, angle: Float, call: ((Double) -> Unit))
|
||
|
||
/**
|
||
* 获取道路宽度
|
||
*/
|
||
fun getRoadWidth(
|
||
lon: Double,
|
||
lat: Double,
|
||
angle: Float,
|
||
isGpsLocation: Boolean,
|
||
isRTK: Boolean
|
||
): Float
|
||
|
||
/**
|
||
* 获取行车方向
|
||
*
|
||
* @return
|
||
*/
|
||
fun getAngle(startLon: Double, startLat: Double, endLon: Double, endLat: Double): Float
|
||
|
||
/**
|
||
* 获取瓦片id
|
||
*
|
||
* @param lon 经度
|
||
* @param lat 纬度
|
||
* @return 瓦片id
|
||
*/
|
||
fun getTileId(lon: Double, lat: Double): Long
|
||
|
||
fun getCityCode(): Int?
|
||
|
||
/**
|
||
* 通过cityCode,缓存城市HDMap
|
||
*/
|
||
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 isCityDataCached(cache: ((Boolean) -> Unit))
|
||
|
||
/**
|
||
* 取消下载 城市HDMap
|
||
*/
|
||
fun cancelDownloadCacheData()
|
||
|
||
/**
|
||
* 根据坐标和朝向获取位置所在的道路信息
|
||
*/
|
||
fun getRoadInfo(lon: Double, lat: Double, angle: Float): RoadInfo
|
||
|
||
/**
|
||
* 根据瓦片Id和道路Id获取车道数据
|
||
*/
|
||
fun getLaneInfo(tileId: Long, roadId: Int): List<Lane>
|
||
|
||
/**
|
||
* 获取公交站点集合
|
||
*/
|
||
fun getBusStation(routeList: ArrayList<LonLatPoint>, result:((MutableList<BusStation>) -> Unit))
|
||
|
||
/**
|
||
* 获取路口数据
|
||
*/
|
||
fun getCrossRoad(lon: Double, lat: Double, angle: Double): CrossRoad?
|
||
}
|