[2.13.0-arch-opt] change the gradle files and map gradle config
This commit is contained in:
@@ -52,13 +52,13 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.amapnavi3dmap
|
||||
|
||||
// implementation rootProject.ext.dependencies.amapsearch
|
||||
implementation project(":OCH:mogo-och-common-module")
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_api
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
implementation rootProject.ext.dependencies.mogo_core_res
|
||||
@@ -66,7 +66,6 @@ dependencies {
|
||||
implementation project(":core:mogo-core-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-api')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:function-impl:mogo-core-function-v2x')
|
||||
implementation project(':core:mogo-core-res')
|
||||
|
||||
@@ -29,8 +29,10 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_C
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_CLOUD
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CONNECT_STATUS
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
|
||||
import com.mogo.eagle.core.function.call.analytics.AnalyticsManager
|
||||
import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
@@ -146,10 +148,9 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
return HttpDnsSimpleLocation(envConfig.cityCode, envConfig.lat, envConfig.lon)
|
||||
}
|
||||
var mogoLocation: MogoLocation? = null
|
||||
val locationClient =
|
||||
CallerMapUIServiceManager.getSingletonLocationClient(AbsMogoApplication.getApp())
|
||||
val locationClient = CallerMapLocationListenerManager.getCurrentLocation()
|
||||
if (locationClient != null) {
|
||||
mogoLocation = locationClient.lastKnowLocation
|
||||
mogoLocation = locationClient
|
||||
}
|
||||
val httpDnsSimpleLocation =
|
||||
if (mogoLocation != null && mogoLocation.latitude != 0.0 && mogoLocation.longitude != 0.0) {
|
||||
@@ -157,7 +158,8 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
&& !CallerMapUIServiceManager.getGDLocationServer(context!!)?.lastCityCode.isNullOrEmpty()
|
||||
) {
|
||||
HttpDnsSimpleLocation(
|
||||
CallerMapUIServiceManager.getGDLocationServer(context!!)?.lastCityCode ?: "010",
|
||||
CallerMapUIServiceManager.getGDLocationServer(context!!)?.lastCityCode
|
||||
?: "010",
|
||||
mogoLocation.latitude,
|
||||
mogoLocation.longitude
|
||||
)
|
||||
@@ -215,7 +217,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
// 异步初始化NetConfig
|
||||
asyncInit()
|
||||
// HttpDns ttl回调 --- socketTTL
|
||||
registerSocketHttpDnsTTL(HostConst.SOCKET_CENTER_DOMAIN)
|
||||
registerSocketHttpDnsTTL()
|
||||
// 开启每5s/次定位上报
|
||||
uploadLocPerFiveSecond()
|
||||
gotToken = true
|
||||
@@ -239,17 +241,14 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
ThreadPoolService.execute {
|
||||
//初始化网络配置
|
||||
NetConfigUtils.init()
|
||||
|
||||
// 初始化埋点
|
||||
AnalyticsManager.init(context, DebugConfig.isDebug())
|
||||
|
||||
// 加入启动统计
|
||||
val mStartParams: HashMap<String, Any> = HashMap()
|
||||
mStartParams["start_time"] = TimeUtils.getNowMills()
|
||||
mStartParams["app_version"] = AppUtils.getAppVersionName()
|
||||
mStartParams["app_flavor"] = DebugConfig.getProductFlavor();
|
||||
mStartParams["app_identity_mode"] = FunctionBuildConfig.appIdentityMode
|
||||
|
||||
AnalyticsManager.track("app_start_time", mStartParams)
|
||||
}
|
||||
}
|
||||
@@ -257,7 +256,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
/**
|
||||
* 请求获取最新的 DNS 微服务 域名信息
|
||||
*/
|
||||
private fun registerSocketHttpDnsTTL(host: String?) {
|
||||
private fun registerSocketHttpDnsTTL() {
|
||||
mogoHttpDns.addressChangedListener(object : OnAddressChangedListener {
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_CONNECT_STATUS,
|
||||
@@ -269,7 +268,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
)
|
||||
override fun onAddressChanged(cityCode: String, address: Map<String, String>?) {
|
||||
val dnsCacheIp = mogoHttpDns.getCachedHttpDnsIps(
|
||||
host,
|
||||
HostConst.SOCKET_CENTER_DOMAIN,
|
||||
HttpDnsConst.HTTP_DNS_ADDRESS_TYPE_HTTP
|
||||
) ?: return
|
||||
if (dnsCacheIp != cacheIp) {
|
||||
@@ -292,19 +291,25 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
context?.let {
|
||||
MogoLocationInfoServices.getInstance().init(it)
|
||||
MogoLocationInfoServices.getInstance().start()
|
||||
val locationClient = CallerMapUIServiceManager.getSingletonLocationClient(it)
|
||||
locationClient?.addLocationListener { location: MogoLocation? ->
|
||||
MogoLocationInfoServices.getInstance().provideLocation(location)
|
||||
}
|
||||
CallerMapLocationListenerManager.addListener(
|
||||
TAG,
|
||||
object : IMoGoMapLocationListener {
|
||||
override fun onLocationChanged(
|
||||
location: MogoLocation?, from: Int, isGps: Boolean) {
|
||||
location?.let {
|
||||
MogoLocationInfoServices.getInstance().provideLocation(it)
|
||||
}
|
||||
}
|
||||
},
|
||||
false
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun startSocketService() {
|
||||
CallerLogger.d(SceneConstant.M_MAIN + TAG, "startSocketService")
|
||||
val location =
|
||||
CallerMapUIServiceManager.getSingletonLocationClient(AbsMogoApplication.getApp())!!
|
||||
.lastKnowLocation
|
||||
val location = CallerMapLocationListenerManager.getCurrentLocation()
|
||||
// 关闭长链服务
|
||||
MogoAiCloudSocketManager.getInstance(context).destroy()
|
||||
MogoAiCloudSocketManager.getInstance(context)
|
||||
@@ -365,8 +370,10 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
}
|
||||
})
|
||||
// 开启Socket长链服务
|
||||
val lat = location.latitude
|
||||
val lon = location.longitude
|
||||
val lat =
|
||||
location?.latitude ?: CallerMapUIServiceManager.getGDLocationServer(context!!)!!.lastLat
|
||||
val lon = location?.longitude
|
||||
?: CallerMapUIServiceManager.getGDLocationServer(context!!)!!.lastLon
|
||||
MogoAiCloudSocketManager.getInstance(context)
|
||||
.init(context, DebugConfig.getSocketAppId(), lat, lon)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.mogo.map.location.IMogoLocationClient;
|
||||
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;
|
||||
|
||||
public
|
||||
@@ -31,6 +30,4 @@ interface IMogoMapApiBuilder extends IProvider {
|
||||
|
||||
IMogoMapView getMapView( Context context );
|
||||
|
||||
IMogoTrafficSearch getTrafficSearch();
|
||||
|
||||
}
|
||||
|
||||
@@ -17,4 +17,8 @@ public interface IMogoGDLocationClient {
|
||||
*/
|
||||
String getLastCityCode();
|
||||
|
||||
double getLastLat();
|
||||
|
||||
double getLastLon();
|
||||
|
||||
}
|
||||
|
||||
@@ -31,11 +31,6 @@ public class MogoLocationListenerRegister implements IMogoLocationListenerRegist
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
private Object readResolve() {
|
||||
// 阻止反序列化,必须实现 Serializable 接口
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
private final Set< IMogoLocationListener > sListeners = new HashSet<>( 10 );
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.mogo.map.search.traffic;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
public interface IMogoTrafficSearch {
|
||||
|
||||
/**
|
||||
* 根据道路名称查询交通态势
|
||||
*
|
||||
* @param adCode 城市code
|
||||
* @param roadName 道路名称
|
||||
*/
|
||||
void searchTrafficByRoad(String adCode,String roadName);
|
||||
|
||||
/**
|
||||
* 根据圆形区域查询交通态势
|
||||
*
|
||||
* @param mogoLatLng 中心点坐标
|
||||
* @param radius 查询半径
|
||||
*/
|
||||
void searchTrafficByCircleArea(MogoLatLng mogoLatLng,int radius);
|
||||
|
||||
/**
|
||||
* 交通态势查询监听
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
void registerTrafficSearchListener(IMogoTrafficSearchListener listener);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package com.mogo.map.search.traffic;
|
||||
|
||||
public interface IMogoTrafficSearchListener {
|
||||
|
||||
void onTrafficSearchInfo(MogoTrafficResult trafficResult);
|
||||
|
||||
void onTrafficSearchError(String errorMsg);
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package com.mogo.map.search.traffic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MogoTrafficResult {
|
||||
|
||||
//路况描述信息
|
||||
private String description;
|
||||
|
||||
//路况评价信息
|
||||
private MogoTrafficStatusEvaluation evaluation;
|
||||
|
||||
//道路列表
|
||||
private List<MogoTrafficStatusInfo> trafficStatusInfos;
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public MogoTrafficStatusEvaluation getEvaluation() {
|
||||
return evaluation;
|
||||
}
|
||||
|
||||
public void setEvaluation(MogoTrafficStatusEvaluation evaluation) {
|
||||
this.evaluation = evaluation;
|
||||
}
|
||||
|
||||
public List<MogoTrafficStatusInfo> getTrafficStatusInfos() {
|
||||
return trafficStatusInfos;
|
||||
}
|
||||
|
||||
public void setTrafficStatusInfos(List<MogoTrafficStatusInfo> trafficStatusInfos) {
|
||||
this.trafficStatusInfos = trafficStatusInfos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoTrafficResult{" +
|
||||
"description='" + description + '\'' +
|
||||
", evaluation=" + evaluation +
|
||||
", trafficStatusInfos=" + trafficStatusInfos +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
package com.mogo.map.search.traffic;
|
||||
|
||||
//交通态势搜索返回的路况信息
|
||||
public class MogoTrafficStatusEvaluation {
|
||||
|
||||
//拥堵所占百分比
|
||||
private String blocked;
|
||||
|
||||
//缓行所占百分比
|
||||
private String congested;
|
||||
|
||||
//路况描述
|
||||
private String description;
|
||||
|
||||
//畅通所占百分比
|
||||
private String expedite;
|
||||
|
||||
//路况状态
|
||||
private String status;
|
||||
|
||||
//未知路段所占百分比
|
||||
private String unKnown;
|
||||
|
||||
public String getBlocked() {
|
||||
return blocked;
|
||||
}
|
||||
|
||||
public void setBlocked(String blocked) {
|
||||
this.blocked = blocked;
|
||||
}
|
||||
|
||||
public String getCongested() {
|
||||
return congested;
|
||||
}
|
||||
|
||||
public void setCongested(String congested) {
|
||||
this.congested = congested;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getExpedite() {
|
||||
return expedite;
|
||||
}
|
||||
|
||||
public void setExpedite(String expedite) {
|
||||
this.expedite = expedite;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getUnKnown() {
|
||||
return unKnown;
|
||||
}
|
||||
|
||||
public void setUnKnown(String unKnown) {
|
||||
this.unKnown = unKnown;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoTrafficStatusEvaluation{" +
|
||||
"blocked='" + blocked + '\'' +
|
||||
", congested='" + congested + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", expedite='" + expedite + '\'' +
|
||||
", status='" + status + '\'' +
|
||||
", unKnown='" + unKnown + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
package com.mogo.map.search.traffic;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
//交通态势查询结果返回道路信息
|
||||
public class MogoTrafficStatusInfo {
|
||||
|
||||
//车行角度
|
||||
private int angle;
|
||||
|
||||
//坐标集合
|
||||
private List<MogoLatLng> mogoLatLngs;
|
||||
|
||||
//方向描述
|
||||
private String direction;
|
||||
|
||||
//方向
|
||||
private String lcodes;
|
||||
|
||||
//设置的道路名称
|
||||
private String name;
|
||||
|
||||
//路况状态
|
||||
private String status;
|
||||
|
||||
public int getAngle() {
|
||||
return angle;
|
||||
}
|
||||
|
||||
public void setAngle(int angle) {
|
||||
this.angle = angle;
|
||||
}
|
||||
|
||||
public List<MogoLatLng> getMogoLatLngs() {
|
||||
return mogoLatLngs;
|
||||
}
|
||||
|
||||
public void setMogoLatLngs(List<MogoLatLng> mogoLatLngs) {
|
||||
this.mogoLatLngs = mogoLatLngs;
|
||||
}
|
||||
|
||||
public String getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection(String direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public String getLcodes() {
|
||||
return lcodes;
|
||||
}
|
||||
|
||||
public void setLcodes(String lcodes) {
|
||||
this.lcodes = lcodes;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoTrafficStatusInfo{" +
|
||||
"angle=" + angle +
|
||||
", mogoLatLngs=" + mogoLatLngs +
|
||||
", direction='" + direction + '\'' +
|
||||
", lcodes='" + lcodes + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", status='" + status + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -262,6 +262,7 @@ public interface IMogoMapUIController {
|
||||
|
||||
}
|
||||
|
||||
//todo 改造,此处调用到数据中心同步,删除此处更新。后续更新调用, {@link CallerMapUIServiceManager#getSingletonLocationClient}
|
||||
/**
|
||||
* 使用自动驾驶车的定位数据
|
||||
*
|
||||
@@ -275,7 +276,6 @@ public interface IMogoMapUIController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取车速资源缓存 id
|
||||
*
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package com.mogo.map;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.map.location.ALocationClient;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
@@ -13,12 +11,8 @@ import com.mogo.map.search.PoiSearchClient;
|
||||
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.AMapUIController;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.zhidaoauto.map.sdk.open.HDTypes;
|
||||
import com.zhidaoauto.map.sdk.open.MapAutoApi;
|
||||
import com.zhidaoauto.map.sdk.open.MapParams;
|
||||
import com.zhidaoauto.map.sdk.open.view.MapAutoView;
|
||||
|
||||
/**
|
||||
@@ -90,11 +84,6 @@ public class CustomMapApiBuilder implements IMogoMapApiBuilder {
|
||||
return mapView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoTrafficSearch getTrafficSearch() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.mogo.map.location.IMogoLocationClient;
|
||||
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;
|
||||
|
||||
|
||||
@@ -58,8 +57,4 @@ class MogoMapDelegateFactory {
|
||||
return getApiBuilder().getMapView(context);
|
||||
}
|
||||
|
||||
public static IMogoTrafficSearch getTrafficSearch() {
|
||||
return getApiBuilder().getTrafficSearch();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
package com.mogo.map;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.map.search.traffic.IMogoTrafficSearch;
|
||||
import com.mogo.map.search.traffic.IMogoTrafficSearchListener;
|
||||
|
||||
public class MogoTrafficSearch implements IMogoTrafficSearch {
|
||||
|
||||
private IMogoTrafficSearch mDelegate;
|
||||
|
||||
public MogoTrafficSearch() {
|
||||
mDelegate = MogoMapDelegateFactory.getTrafficSearch();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void searchTrafficByRoad(String adCode, String roadName) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.searchTrafficByRoad(adCode, roadName);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void searchTrafficByCircleArea(MogoLatLng mogoLatLng, int radius) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.searchTrafficByCircleArea(mogoLatLng, radius);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerTrafficSearchListener(IMogoTrafficSearchListener listener) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.registerTrafficSearchListener(listener);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.constants.SharedPrefsConstants;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
|
||||
public class GDLocationClient implements AMapLocationListener,IMogoGDLocationClient {
|
||||
public class GDLocationClient implements AMapLocationListener, IMogoGDLocationClient {
|
||||
|
||||
private volatile static GDLocationClient gdLocationClient;
|
||||
private static final byte[] obj = new byte[0];
|
||||
@@ -27,8 +27,9 @@ public class GDLocationClient implements AMapLocationListener,IMogoGDLocationCli
|
||||
}
|
||||
|
||||
//声明LocationClient对象
|
||||
private AMapLocationClient mLocationClient;
|
||||
private AMapLocationClient mLocationClient;
|
||||
private String mCityCode;
|
||||
private AMapLocation mapLocation;
|
||||
|
||||
private GDLocationClient(Context context) {
|
||||
AMapLocationClient.updatePrivacyShow(context, true, true);
|
||||
@@ -69,6 +70,7 @@ public class GDLocationClient implements AMapLocationListener,IMogoGDLocationCli
|
||||
@Override
|
||||
public void onLocationChanged(AMapLocation aMapLocation) {
|
||||
if (aMapLocation != null) {
|
||||
mapLocation = aMapLocation;
|
||||
String cityCode = aMapLocation.getCityCode();
|
||||
if (cityCode != null && !cityCode.isEmpty()) {
|
||||
mCityCode = aMapLocation.getCityCode();
|
||||
@@ -82,4 +84,14 @@ public class GDLocationClient implements AMapLocationListener,IMogoGDLocationCli
|
||||
public String getLastCityCode() {
|
||||
return mCityCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getLastLat() {
|
||||
return mapLocation != null ? mapLocation.getLatitude() : 0.0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getLastLon() {
|
||||
return mapLocation != null ? mapLocation.getLongitude() : 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user