Merge branch 'dev_robotaxi-d_230912_6.1.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_robotaxi-d_230912_6.1.0

This commit is contained in:
xinfengkun
2023-09-25 15:09:12 +08:00
1542 changed files with 77840 additions and 7659 deletions

View File

@@ -1,15 +1,23 @@
package com.mogo.eagle.core.function.call.map
import com.mogo.eagle.core.data.map.MapRoadInfo.StopLine
import com.mogo.eagle.core.data.deva.chain.ChainConstant
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
import com.zhidaoauto.map.data.road.RoadCross
import com.zhidaoauto.map.data.road.StopLine
import com.zhjt.service.chain.ChainLog
import java.util.concurrent.ConcurrentHashMap
import kotlin.properties.Delegates
object CallerMapRoadListenerManager {
interface OnRoadListener {
fun onRoadIdInfo(roadId: String)
fun onRoadIdInfo(roadId: String) {}
fun onStopLineInfo(info: StopLine)
fun onStopLineInfo(info: StopLine) {}
fun onRoadChange(cross: Boolean) {}
}
private val listeners by lazy {
@@ -42,4 +50,24 @@ object CallerMapRoadListenerManager {
entry.value.onStopLineInfo(stopLine)
}
}
private var mCross: Boolean by Delegates.observable(false) { _, oldValue, newValue ->
if (oldValue != newValue) {
CallerLogger.d("$M_MAP onRoadChange", newValue)
listeners.forEach { entry ->
entry.value.onRoadChange(newValue)
}
}
}
@ChainLog(
linkChainLog = ChainConstant.CHAIN_TYPE_HD_MAP,
linkCode = ChainConstant.CHAIN_SOURCE_MAP,
nodeAliasCode = ChainConstant.CHAIN_CODE_HD_MAP_ROAD_CROSS,
paramIndexes = [0, 1]
)
fun invokeRoadChange(cross: Boolean, roadCross: RoadCross) {
mCross = cross
}
}

View File

@@ -1,46 +0,0 @@
package com.mogo.eagle.core.function.call.map
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapStyleChangeListener
import com.mogo.eagle.core.function.call.base.CallerBase
/**
* @author xiaoyuzhou
* @date 2021/9/30 5:48 下午
* 地图 样式改变 监听管理
*/
object CallerMapStyleListenerManager : CallerBase<IMoGoMapStyleChangeListener>() {
// 记录地图样式
private var mMapStyleMode = 0
/**
* 返回当前的地图皮肤
*/
fun getMapStyleMode(): Int {
return mMapStyleMode
}
override fun doSomeAfterAddListener(tag: String, listener: IMoGoMapStyleChangeListener) {
listener.onMapStyleModeChange(mMapStyleMode)
}
/**
* 触发 地图样式改变 监听
*/
fun invokeMapStyleChange() {
invokeMapStyleChange(mMapStyleMode)
}
/**
* 触发 地图样式改变 监听
* @param mapStyleMode 选中状态
*/
fun invokeMapStyleChange(mapStyleMode: Int) {
mMapStyleMode = mapStyleMode
M_LISTENERS.forEach {
val listener = it.value
listener.onMapStyleModeChange(mMapStyleMode)
}
}
}

View File

@@ -1,11 +1,9 @@
package com.mogo.eagle.core.function.call.map
import android.content.Context
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.map.IMogoMapService
import com.mogo.eagle.core.function.call.base.CallerBase
import com.mogo.map.hdcache.IHdCacheListener
import com.mogo.map.MogoMap.Companion.DEFAULT
import com.mogo.map.location.IMogoGDLocationClient
import com.mogo.map.overlay.*
import com.mogo.map.uicontroller.IMogoMapUIController
@@ -18,35 +16,21 @@ object CallerMapUIServiceManager {
)
}
fun getMapUIController(): IMogoMapUIController? {
return serviceProvider?.mapUIController
}
fun cacheHDDataByCity(listener: IHdCacheListener) {
serviceProvider?.mapUIController?.cacheHDDataByCity(listener)
}
fun cacheHDDataByCityByLonLat(listener: IHdCacheListener, location: MogoLocation) {
serviceProvider?.mapUIController?.cacheHDDataByCity(listener, location)
}
fun isCityDataCached(): Boolean {
return serviceProvider?.mapUIController?.isCityDataCached ?: false
//根据需要,以业务回调的方式对地图进行修改,或直接调用 DEFAULT 地图。
fun getMapUIController(mapTag:String = DEFAULT): IMogoMapUIController? {
return serviceProvider?.getMapUIController(mapTag)
}
fun getOverlayManager(): IMoGoOverlayManager? {
return serviceProvider?.overlayManager
return serviceProvider?.getOverlayManager()
}
fun getGDLocationServer(context: Context): IMogoGDLocationClient?{
return serviceProvider?.getGDLocationServer(context)
}
fun cancelDownloadCacheData() {
serviceProvider?.mapUIController?.cancelDownloadCacheData()
fun getGDLocationServer(): IMogoGDLocationClient?{
return serviceProvider?.getGDLocationServer()
}
fun getCityCode(): String? {
return serviceProvider?.mapUIController?.cityCode
return serviceProvider?.getGDLocationServer()?.lastCityCode
}
}

View File

@@ -7,7 +7,7 @@ import com.mogo.eagle.core.function.api.map.angle.*
/**
* 高精地图视角管理类
* 高精地图视角管理类,根据业务需要,以业务回调/直接调用地图 ,对地图进行改变
*/
object CallerVisualAngleManager {
@@ -21,7 +21,6 @@ object CallerVisualAngleManager {
}
}
fun changeAngle(scene: Scene) {
provider?.changeAngle(scene)
}

View File

@@ -38,4 +38,14 @@ object CallerSopSettingManager: CallerBase<ISopSettingListener>() {
}
}
/**
* 触发自车光圈事件监听
*/
fun invokeCarApertureListener(status: Boolean){
M_LISTENERS.forEach {
val listener = it.value
listener.onCarApertureClickEvent(status)
}
}
}