[2.13.0-arch-opt] change the gradle files and map gradle config
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.core.function.impl;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.eagle.core.function.api.map.IMogoMapService;
|
||||
@@ -12,9 +13,6 @@ import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.map.MogoMarkerManager;
|
||||
import com.mogo.map.MogoOverlayManager;
|
||||
import com.mogo.map.MogoPoiSearch;
|
||||
import com.mogo.map.MogoTrafficSearch;
|
||||
import com.mogo.map.listener.IMogoHosListenerRegister;
|
||||
import com.mogo.map.listener.MogoHosListenerRegister;
|
||||
import com.mogo.map.location.GDLocationClient;
|
||||
import com.mogo.map.location.IMogoGDLocationClient;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
@@ -23,7 +21,6 @@ import com.mogo.map.overlay.IMogoOverlayManager;
|
||||
import com.mogo.map.search.geo.IMogoGeoSearch;
|
||||
import com.mogo.map.search.poisearch.IMogoPoiSearch;
|
||||
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
import com.mogo.map.search.traffic.IMogoTrafficSearch;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
|
||||
/**
|
||||
@@ -65,21 +62,11 @@ public class MogoMapService implements IMogoMapService {
|
||||
return MogoMapUIController.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoHosListenerRegister getHostListenerRegister() {
|
||||
return MogoHosListenerRegister.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoOverlayManager getOverlayManager(Context context) {
|
||||
return MogoOverlayManager.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoTrafficSearch getTrafficSearchApi() {
|
||||
return new MogoTrafficSearch();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoGDLocationClient getGDLocationServer(Context context) {
|
||||
return GDLocationClient.getInstance(context);
|
||||
|
||||
@@ -22,31 +22,6 @@ import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
public class LocationUtils {
|
||||
private static final String TAG = "LocationUtils";
|
||||
|
||||
/**
|
||||
* 获取当前位置
|
||||
*
|
||||
* @return 当前位置
|
||||
*/
|
||||
public static MogoLatLng getCurrentLatLon() {
|
||||
// 当前车辆位置
|
||||
MogoLatLng latLon = new MogoLatLng(
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lat(),
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lon()
|
||||
);
|
||||
IMogoLocationClient locationClient = CallerMapUIServiceManager.INSTANCE.getSingletonLocationClient(AbsMogoApplication.getApp());
|
||||
if (locationClient != null) {
|
||||
MogoLocation location = locationClient.getLastKnowLocation();
|
||||
if (location != null) {
|
||||
latLon = new MogoLatLng(location.getLatitude(), location.getLongitude());
|
||||
}
|
||||
}
|
||||
IMogoMapUIController mapUiController = CallerMapUIServiceManager.INSTANCE.getMapUIController();
|
||||
if (mapUiController != null) {
|
||||
latLon = mapUiController.getWindowCenterLocation();
|
||||
}
|
||||
return latLon;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取传入的经纬度在车辆的什么位置
|
||||
*
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.mogo.eagle.core.data.v2x.VipMessage
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.call.vip.CallVipSetListenerManager
|
||||
@@ -196,10 +196,9 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
|
||||
fun turnLight(controlTime: Int) {
|
||||
if (result == null || mContext == null) return
|
||||
val locationClient = CallerMapUIServiceManager.getSingletonLocationClient(mContext!!)
|
||||
if (locationClient != null) {
|
||||
val bearing =
|
||||
locationClient.lastKnowLocation.bearing.toDouble()
|
||||
val mogoLocation = CallerMapLocationListenerManager.getCurrentLocation()
|
||||
if (mogoLocation != null) {
|
||||
val bearing = mogoLocation.bearing.toDouble()
|
||||
CallerLogger.d("$M_V2X$TAG", "-- turnLight -- ")
|
||||
MogoTrafficLightManager.INSTANCE.turnLightToGreen(
|
||||
result!!.lightId, result!!.crossId, bearing, controlTime,
|
||||
@@ -276,7 +275,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
ttsContent: String,
|
||||
tag: String
|
||||
) {
|
||||
if (alertContent.toString().isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
if (alertContent.toString().isEmpty() || ttsContent.isEmpty()) {
|
||||
Log.d("MsgBox-VipCarManager", "alertContent或ttsContent为空!")
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
|
||||
@@ -4,7 +4,6 @@ import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.eagle.core.function.api.map.marker.IMogoMarkerService;
|
||||
import com.mogo.map.listener.IMogoHosListenerRegister;
|
||||
import com.mogo.map.location.IMogoGDLocationClient;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.marker.IMogoMarkerManager;
|
||||
@@ -12,7 +11,6 @@ import com.mogo.map.overlay.IMogoOverlayManager;
|
||||
import com.mogo.map.search.geo.IMogoGeoSearch;
|
||||
import com.mogo.map.search.poisearch.IMogoPoiSearch;
|
||||
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
import com.mogo.map.search.traffic.IMogoTrafficSearch;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
|
||||
/**
|
||||
@@ -29,7 +27,7 @@ public interface IMogoMapService extends IProvider {
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
IMogoLocationClient getSingletonLocationClient( Context context );
|
||||
IMogoLocationClient getSingletonLocationClient(Context context);
|
||||
|
||||
/**
|
||||
* 地理编码或逆地理编码服务
|
||||
@@ -37,7 +35,7 @@ public interface IMogoMapService extends IProvider {
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
IMogoGeoSearch getGeoSearch( Context context );
|
||||
IMogoGeoSearch getGeoSearch(Context context);
|
||||
|
||||
/**
|
||||
* poi搜索服务
|
||||
@@ -46,18 +44,18 @@ public interface IMogoMapService extends IProvider {
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
IMogoPoiSearch getPoiSearch( Context context, MogoPoiSearchQuery query );
|
||||
|
||||
IMogoPoiSearch getPoiSearch(Context context, MogoPoiSearchQuery query);
|
||||
|
||||
/**
|
||||
* marker 操作
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoMarkerManager getMarkerManager( Context context );
|
||||
IMogoMarkerManager getMarkerManager(Context context);
|
||||
|
||||
/**
|
||||
* 带有业务标注的服务marker
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoMarkerService getMarkerService();
|
||||
@@ -69,30 +67,17 @@ public interface IMogoMapService extends IProvider {
|
||||
*/
|
||||
IMogoMapUIController getMapUIController();
|
||||
|
||||
/**
|
||||
* 主模块监听注册
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoHosListenerRegister getHostListenerRegister();
|
||||
|
||||
/**
|
||||
* 覆盖物操作
|
||||
*
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
IMogoOverlayManager getOverlayManager( Context context );
|
||||
|
||||
/**
|
||||
* 交通态势查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoTrafficSearch getTrafficSearchApi();
|
||||
IMogoOverlayManager getOverlayManager(Context context);
|
||||
|
||||
/**
|
||||
* 获取高德定位服务
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoGDLocationClient getGDLocationServer(Context context);
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.zhidao.support.adas.high.common.MessageType
|
||||
object CallerHDMapManager : CallerBase() {
|
||||
private val mapProviderApi: IMoGoMapFragmentProvider
|
||||
get() = ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_MAP)
|
||||
.navigation() as IMoGoMapFragmentProvider;
|
||||
.navigation() as IMoGoMapFragmentProvider
|
||||
|
||||
/**
|
||||
* 修改地图中心点
|
||||
|
||||
@@ -23,6 +23,7 @@ object CallerMapUIServiceManager {
|
||||
return serviceProvider?.mapUIController
|
||||
}
|
||||
|
||||
//todo 改造,module-map中监听location定位回调,调用至地图更新,解除map-api对caller的依赖关系
|
||||
fun getSingletonLocationClient(context: Context): IMogoLocationClient? {
|
||||
return serviceProvider?.getSingletonLocationClient(context)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user