[Update]Map按照新架构重构
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.map
|
||||
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.map.location.IMoGoLocationUpdater4AutoPilot
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
object CallerLocationUpdaterManager {
|
||||
|
||||
private val updater : IMoGoLocationUpdater4AutoPilot? by lazy {
|
||||
CallerBase.getApiInstance(
|
||||
IMoGoLocationUpdater4AutoPilot::class.java,
|
||||
MogoServicePaths.PATH_MAP_LOCATION_UPDATE_4_AUTO_PILOT)
|
||||
}
|
||||
|
||||
fun updateLocation(location: Any?) {
|
||||
updater?.updateLocation(location);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
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.function.api.map.IMogoMapService
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.map.listener.IMogoHosListenerRegister
|
||||
import com.mogo.map.location.IMogoLocationClient
|
||||
import com.mogo.map.marker.IMogoMarkerManager
|
||||
import com.mogo.map.search.geo.IMogoGeoSearch
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController
|
||||
|
||||
object CallerMapUIServiceManager {
|
||||
private val serviceProvider : IMogoMapService? by lazy {
|
||||
CallerBase.getApiInstance(
|
||||
IMogoMapService::class.java,
|
||||
MogoServicePaths.PATH_SERVICES_MAP)
|
||||
}
|
||||
|
||||
fun getMapUIController(): IMogoMapUIController? {
|
||||
return serviceProvider?.mapUIController
|
||||
}
|
||||
|
||||
fun getHostListenerRegister(): IMogoHosListenerRegister? {
|
||||
return serviceProvider?.hostListenerRegister
|
||||
}
|
||||
|
||||
fun getSingletonLocationClient(context: Context): IMogoLocationClient? {
|
||||
return serviceProvider?.getSingletonLocationClient(context)
|
||||
}
|
||||
|
||||
fun getGeoSearch(context: Context): IMogoGeoSearch? {
|
||||
return serviceProvider?.getGeoSearch(context)
|
||||
}
|
||||
|
||||
fun getMarkerManager(context: Context): IMogoMarkerManager? {
|
||||
return serviceProvider?.getMarkerManager(context)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user