[Change]
[1、临时升级高精地图,升级高德地图
2、处理因升级高德地图带来的适配问题
3、小地图适配Bus车型]

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2022-12-07 19:51:21 +08:00
parent 59600dd776
commit e265fb582d
9 changed files with 47 additions and 24 deletions

View File

@@ -52,7 +52,7 @@ dependencies {
implementation rootProject.ext.dependencies.rxandroid
implementation rootProject.ext.dependencies.androidxconstraintlayout
implementation rootProject.ext.dependencies.amapnavi3dmap
implementation rootProject.ext.dependencies.amapsearch
// implementation rootProject.ext.dependencies.amapsearch
implementation project(":OCH:mogo-och-common-module")
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.mogoutils

View File

@@ -44,7 +44,7 @@ class ConfigStartUp : AndroidStartup<Boolean>() {
Log.d("ConfigStartUp", "ProcessUtils.getCurrentProcessName():" + ProcessUtils.getCurrentProcessName())
// TODO:这里影响当前Activity的身份信息多进程先保持与原来一样主进程为司机端:passenger 进程为乘客端
// 这里影响当前Activity的身份信息多进程先保持与原来一样主进程为司机端:passenger 进程为乘客端
if (ProcessUtils.getCurrentProcessName().contains(":passenger")) {
if (AppIdentityModeUtils.isBus(BuildConfig.APP_IDENTITY_MODE)) {
FunctionBuildConfig.appIdentityMode = 0xA1

View File

@@ -131,7 +131,12 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
// 设置AI云平台分配给三方应用的签名密钥需要从AI云平台申请
// 设置车机设备的唯一标识(这些表识必须是通过后台录入的设备)
// TODO 现在这块逻辑因为网约车业务那后台的限制,还没有更换,条件成熟后替换为 DeviceIdUtils.getWidevineIDWithMd5(context)
clientConfig.thirdPartyDeviceId = Utils.getDevicesId()
// 这里影响当前Activity的身份信息多进程先保持与原来一样主进程为司机端:passenger 进程为乘客端
if (ProcessUtils.getCurrentProcessName().contains(":passenger")) {
clientConfig.thirdPartyDeviceId = Utils.getDevicesId() + "_passenger"
} else {
clientConfig.thirdPartyDeviceId = Utils.getDevicesId()
}
// 设置循环检测间隔时间每隔2小时loop一次httpDnsConfig
clientConfig.loopCheckDelay = (60 * 60 * 2 * 1000).toLong()
//设置长链接的secretKey //todo 通过SHA1和包名找中台服务生成后续包名分渠道,需要做对应操作

View File

@@ -22,7 +22,7 @@ ext {
// amapnavi3dmap : "com.amap.api:navi-3dmap:8.0.1_3dmap8.0.1",
// amapsearch : "com.amap.api:search:7.9.0",
// amaplocation : "com.amap.api:location:5.5.0",
amapnavi3dmap : "com.amap.api:navi-3dmap:8.0.1_3dmap8.0.1",
amapnavi3dmap : "com.amap.api:navi-3dmap:9.5.0_3dmap9.5.0",
amapsearch : "com.amap.api:search:7.1.0",
amaplocation : "com.amap.api:location:5.3.1",
// json 转换

View File

@@ -60,7 +60,7 @@ dependencies {
implementation rootProject.ext.dependencies.mogocustommap
implementation rootProject.ext.dependencies.amapnavi3dmap
implementation rootProject.ext.dependencies.amaplocation
// implementation rootProject.ext.dependencies.amaplocation
implementation rootProject.ext.dependencies.androidxroomruntime
kapt rootProject.ext.dependencies.androidxroomcompiler

View File

@@ -30,12 +30,14 @@ import com.amap.api.maps.model.MarkerOptions;
import com.amap.api.maps.model.Polyline;
import com.amap.api.maps.model.PolylineOptions;
import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.map.MogoLatLng;
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.map.CallerMapLocationListenerManager;
import com.mogo.eagle.core.function.map.R;
import com.mogo.eagle.core.function.smp.view.ISmallMapDirectionView;
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
import com.mogo.eagle.core.utilcode.mogo.MapAssetStyleUtils;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.widget.RoundLayout;
@@ -128,9 +130,15 @@ public class SmallMapDirectionView
// 关闭显示实时路况图层aMap是地图控制器对象。
mAMap.setTrafficEnabled(false);
// 设置 锚点 图标
mCarMarker = mAMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.module_small_map_view_my_location_logo))
.anchor(0.5f, 0.5f));
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){
mCarMarker = mAMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.map_bus_icon))
.anchor(0.5f, 0.5f));
}else{
mCarMarker = mAMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.map_car_icon))
.anchor(0.5f, 0.5f));
}
mStartMarker = mAMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.module_small_map_view_dir_start)));
mEndMarker = mAMap.addMarker(new MarkerOptions()

View File

@@ -85,7 +85,7 @@ MOGO_LOCATION_VERSION=1.4.3.27
MOGO_TELEMATIC_VERSION=1.4.3.27
######## MogoAiCloudSDK Version ########
# 自研地图
MAP_SDK_VERSION=2.8.0.1
MAP_SDK_VERSION=2.8.0.7_map
MAP_SDK_OPERATION_VERSION=1.1.3.5
# websocket
WEBSOCKET_VERSION=1.1.7

View File

@@ -49,7 +49,8 @@ dependencies {
// 高精地图
implementation rootProject.ext.dependencies.mogocustommap
// 高德地图
api rootProject.ext.dependencies.amaplocation
// api rootProject.ext.dependencies.amaplocation
api rootProject.ext.dependencies.amapnavi3dmap
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.mogo_core_utils

View File

@@ -27,26 +27,35 @@ public class GDLocationClient implements AMapLocationListener {
}
//声明LocationClient对象
private final AMapLocationClient mLocationClient;
private AMapLocationClient mLocationClient;
private String mCityCode;
private GDLocationClient(Context context) {
mLocationClient = new AMapLocationClient(context);
//初始化定位参数
//声明mLocationOption对象
AMapLocationClientOption mLocationOption = new AMapLocationClientOption();
//设置定位监听
mLocationClient.setLocationListener(this);
//设置定位模式为高精度模式Battery_Saving为低功耗模式Device_Sensors是仅设备模式
mLocationOption.setLocationMode(AMapLocationClientOption.AMapLocationMode.Hight_Accuracy);
//设置定位间隔,单位毫秒,默认为2000ms
mLocationOption.setInterval(1000);
//设置定位参数
mLocationClient.setLocationOption(mLocationOption);
AMapLocationClient.updatePrivacyShow(context, true, true);
AMapLocationClient.updatePrivacyAgree(context, true);
try {
mLocationClient = new AMapLocationClient(context);
//初始化定位参数
//声明mLocationOption对象
AMapLocationClientOption mLocationOption = new AMapLocationClientOption();
//设置定位监听
mLocationClient.setLocationListener(this);
//设置定位模式为高精度模式Battery_Saving为低功耗模式Device_Sensors是仅设备模式
mLocationOption.setLocationMode(AMapLocationClientOption.AMapLocationMode.Hight_Accuracy);
//设置定位间隔,单位毫秒,默认为2000ms
mLocationOption.setInterval(1000);
//设置定位参数
mLocationClient.setLocationOption(mLocationOption);
} catch (Exception e) {
e.printStackTrace();
}
}
public void start() {
mLocationClient.startLocation();
if (mLocationClient != null) {
mLocationClient.startLocation();
}
}
@Override