[base_3.4.0-map-sdk]
This commit is contained in:
@@ -1,47 +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 tag = it.key
|
||||
val listener = it.value
|
||||
listener.onMapStyleModeChange(mMapStyleMode)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -34,6 +34,14 @@ object CallerMapUIServiceManager {
|
||||
return serviceProvider?.mapUIController?.isCityDataCached ?: false
|
||||
}
|
||||
|
||||
fun cancelDownloadCacheData() {
|
||||
serviceProvider?.mapUIController?.cancelDownloadCacheData()
|
||||
}
|
||||
|
||||
fun getCityCode(): String? {
|
||||
return serviceProvider?.mapUIController?.cityCode
|
||||
}
|
||||
|
||||
fun getOverlayManager(): IMoGoOverlayManager? {
|
||||
return serviceProvider?.overlayManager
|
||||
}
|
||||
@@ -42,11 +50,4 @@ object CallerMapUIServiceManager {
|
||||
return serviceProvider?.getGDLocationServer(context)
|
||||
}
|
||||
|
||||
fun cancelDownloadCacheData() {
|
||||
serviceProvider?.mapUIController?.cancelDownloadCacheData()
|
||||
}
|
||||
|
||||
fun getCityCode(): String? {
|
||||
return serviceProvider?.mapUIController?.cityCode
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user