[6.7.0][地图sdk] 升级地图sdk版本,并修复编译错误
This commit is contained in:
@@ -161,6 +161,10 @@ android {
|
||||
|
||||
packagingOptions {
|
||||
exclude 'META-INF/io.netty.versions.properties'
|
||||
doNotStrip '*/armeabi-v7a/*.so'
|
||||
doNotStrip '*/armeabi/*.so'
|
||||
doNotStrip '*/x86_64/*.so'
|
||||
doNotStrip '*/x86/*.so'
|
||||
}
|
||||
|
||||
useLibrary 'android.test.runner'
|
||||
@@ -201,8 +205,7 @@ dependencies {
|
||||
compileOnly rootProject.ext.dependencies.serialport
|
||||
}
|
||||
|
||||
// implementation rootProject.ext.dependencies.mogocustommap
|
||||
implementation project(':libraries:mapmodule')
|
||||
implementation rootProject.ext.dependencies.mogocustommap
|
||||
|
||||
implementation project(':core:function-impl:mogo-core-function-startup')
|
||||
implementation project(':core:function-impl:mogo-core-function-devatools')
|
||||
|
||||
@@ -1,28 +1,35 @@
|
||||
package com.mogo.launcher.startup
|
||||
|
||||
import android.content.Context
|
||||
import com.autonavi.nge.hdmap.HDMapProvider
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.app.UrlConfig
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.config.JunkConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ProcessUtils
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils
|
||||
import com.mogo.launcher.BuildConfig
|
||||
import com.mogo.launcher.R
|
||||
import com.shuyu.gsyvideoplayer.player.IjkPlayerManager
|
||||
import com.zhidaoauto.map.sdk.open.MapAutoApi
|
||||
import com.zhidaoauto.map.sdk.open.MapParams
|
||||
import com.zhjt.mogo_core_function_devatools.env.EnvChangeManager
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import tv.danmaku.ijk.media.player.IjkMediaPlayer
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
|
||||
object ConfigStartUp {
|
||||
|
||||
private const val TAG = "ConfigStartUp"
|
||||
|
||||
private val redisCallback by lazy { AtomicReference<HDMapProvider.IRedisLoadCallback>()}
|
||||
|
||||
@JvmStatic
|
||||
fun init(context: Context) {
|
||||
initDebugConfig()
|
||||
@@ -118,6 +125,72 @@ object ConfigStartUp {
|
||||
.setIsRecordLogs(false)
|
||||
.setCoordinateType(MapParams.COORDINATETYPE_GCJ02)
|
||||
MapAutoApi.init(context, mapParams)
|
||||
HDMapProvider.setRedisDataLoadCallback(object : HDMapProvider.IRedisLoadCallback {
|
||||
|
||||
override fun onLoginStart(ip: String, port: Int, password: String, dbIndex: Int) {
|
||||
Logger.d(TAG, "-- onLoginStart --: ip: $ip, port: $port, password: $password, dbIndex: $dbIndex")
|
||||
onRedisDataLoadRoute(mapOf("onLoginStart" to "ip:$ip, port:$port, password: $password, dbIndex: $dbIndex"))
|
||||
}
|
||||
|
||||
|
||||
override fun onLoginSuccess() {
|
||||
Logger.d(TAG, "-- onLoginSuccess --")
|
||||
onRedisDataLoadRoute(mapOf("onLoginSuccess" to ""))
|
||||
}
|
||||
|
||||
override fun onLoginFailed(error: String?) {
|
||||
Logger.d(TAG, "-- onLoginFailed($error) --")
|
||||
onRedisDataLoadRoute(mapOf("onLoginFailed" to "fail_reason:$error"))
|
||||
}
|
||||
|
||||
override fun onReLogin(isCanRetry: Boolean) {
|
||||
Logger.d(TAG, "-- onReLogin($isCanRetry) --")
|
||||
onRedisDataLoadRoute(mapOf("onReLogin" to "isCanRetry:$isCanRetry"))
|
||||
}
|
||||
|
||||
override fun onTileLoadStart(layerId: String, tileId: String) {
|
||||
Logger.d(TAG, "-- onTileLoadStart(layerId: $layerId, tileId: $tileId) --")
|
||||
onRedisDataLoadRoute(mapOf("onTileLoadStart" to "layerId: $layerId, tileId: $tileId"))
|
||||
}
|
||||
|
||||
override fun onTileLoadFail(layerId: String, tileId: String, error: String) {
|
||||
Logger.d(TAG, "-- onTileLoadFail(layerId: $layerId, tileId: $tileId, error: $error) --")
|
||||
onRedisDataLoadRoute(mapOf("onTileLoadFail" to "layerId: $layerId, tileId: $tileId, error: $error"))
|
||||
}
|
||||
|
||||
override fun onTileLoadSuccess(layerId: String, tileId: String) {
|
||||
Logger.d(TAG, "-- onTileLoadSuccess(layerId: $layerId, tileId: $tileId) --")
|
||||
onRedisDataLoadRoute(mapOf("onTileLoadSuccess" to "layerId: $layerId, tileId: $tileId"))
|
||||
}
|
||||
|
||||
override fun onTilesLoadStart(layerId: String, tileIds: List<String>) {
|
||||
Logger.d(TAG, "-- onTilesLoadStart(layerId: $layerId, tileIds: ${tileIds.joinToString(",")}) --")
|
||||
onRedisDataLoadRoute(mapOf("onTilesLoadStart" to "layerId: $layerId, tileIds: ${tileIds.joinToString(",")}"))
|
||||
}
|
||||
|
||||
override fun onTilesLoadFail(layerId: String, tileIds: List<String>, error: String?) {
|
||||
Logger.d(TAG, "-- onTilesLoadFail(layerId: $layerId, tileIds: ${tileIds.joinToString(",")}, error: $error) --")
|
||||
onRedisDataLoadRoute(mapOf("onTilesLoadFail" to "layerId: $layerId, tileIds: ${tileIds.joinToString(",")}, error:$error"))
|
||||
}
|
||||
|
||||
|
||||
override fun onTilesLoadSuccess(layerId: String, tileIds: List<String>) {
|
||||
Logger.d(TAG, "-- onTilesLoadSuccess(layerId: $layerId, tileIds: ${tileIds.joinToString(",")}) --")
|
||||
onRedisDataLoadRoute(mapOf("onTilesLoadSuccess" to "layerId: $layerId, tileIds: ${tileIds.joinToString(",")}"))
|
||||
}
|
||||
}.also {
|
||||
redisCallback.set(it) // 将此回调保存起来,只为了在native层的引用不回收,因为native层的引用是全局弱引用
|
||||
})
|
||||
|
||||
// HDMapProvider.toggleSystrace(true) // 开启systrace, 此功能默认关闭,只要在开发阶段定位渲染问题时才打开。(前提需要在地图sdk在关键节点进行手动打点后,再开启,之后使用systrace工具进行抓取trace文件进行分析)
|
||||
// HDMapProvider.toggleMapDataDebugInfo(true) // 打开地图调试信息的文字展示,此功能也默认关闭,只有在地图测试工具中使用
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_CLOUD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_REDIS_DATA_LOAD,
|
||||
paramIndexes = [0]
|
||||
)
|
||||
private fun onRedisDataLoadRoute(extra: Map<String, Any>) {}
|
||||
}
|
||||
22
build.gradle
22
build.gradle
@@ -153,6 +153,26 @@ subprojects.each {
|
||||
}
|
||||
}
|
||||
|
||||
subprojects.each {
|
||||
it.afterEvaluate { itx ->
|
||||
if (itx.plugins.hasPlugin('com.android.library') || itx.plugins.hasPlugin('com.android.application')) {
|
||||
def android = itx.extensions.findByName("android")
|
||||
android.buildTypes {
|
||||
configureEach { buildType ->
|
||||
def matchingFallbacks = buildType.matchingFallbacks ?: []
|
||||
def array = isReleaseBuild() ? ['release', 'debug'] : ['debug', 'release']
|
||||
array.each { fallback ->
|
||||
if (!matchingFallbacks.contains(fallback)) {
|
||||
matchingFallbacks += fallback
|
||||
}
|
||||
}
|
||||
buildType.matchingFallbacks = matchingFallbacks
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boolean isAndroidTestBuild() {
|
||||
for (String s : gradle.startParameter.taskNames) {
|
||||
if (s.contains("AndroidTest")) {
|
||||
@@ -172,5 +192,5 @@ boolean isReleaseBuild() {
|
||||
}
|
||||
|
||||
boolean isJunkDetectEnable() {
|
||||
return !isReleaseBuild()
|
||||
return false
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
<!--android:keyHeight="122dp"
|
||||
android:keyWidth="237dp"-->
|
||||
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:keyboard="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:keyHeight="122dp"
|
||||
android:keyWidth="239dp"
|
||||
android:horizontalGap="1dp"
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
<Key
|
||||
android:codes="-4"
|
||||
keyboard:keyBackground="@drawable/keyboard_blue"
|
||||
app:keyBackground="@drawable/keyboard_blue"
|
||||
android:keyHeight="368dp"
|
||||
android:keyLabel="确定"/>
|
||||
</Row>
|
||||
|
||||
@@ -61,8 +61,7 @@ dependencies {
|
||||
exclude group: 'com.zhidaoauto.machine', module: 'map'
|
||||
}
|
||||
|
||||
// implementation rootProject.ext.dependencies.mogocustommap
|
||||
implementation project(':libraries:mapmodule')
|
||||
implementation rootProject.ext.dependencies.mogocustommap
|
||||
implementation rootProject.ext.dependencies.amapnavi3dmap
|
||||
|
||||
implementation rootProject.ext.dependencies.androidxroomruntime
|
||||
|
||||
@@ -96,6 +96,7 @@ class ChainConstant {
|
||||
const val CHAIN_CODE_MAIN_BLOCK = "CHAIN_CODE_MAIN_BLOCK"
|
||||
const val CHAIN_CODE_DISPATCH_RECEIVE = "CHAIN_CODE_DISPATCH_RECEIVE"
|
||||
const val CHAIN_CODE_DISPATCH_START = "CHAIN_CODE_DISPATCH_START"
|
||||
const val CHAIN_CODE_REDIS_DATA_LOAD = "CHAIN_CODE_REDIS_DATA_LOAD"
|
||||
|
||||
const val CHAIN_CODE_CLOUD_INIT = "CHAIN_CODE_CLOUD_INIT"
|
||||
const val CHAIN_CODE_CLOUD_PASSPORT_TOKEN = "CHAIN_CODE_CLOUD_PASSPORT_TOKEN"
|
||||
|
||||
@@ -81,7 +81,7 @@ MOGO_LOCATION_VERSION=1.4.7.42
|
||||
MOGO_TELEMATIC_VERSION=1.4.7.42
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=3.4.1.2
|
||||
MAP_SDK_VERSION=3.4.1.13_alpha_7
|
||||
MAP_SDK_DATA_VERSION=1.0.0.9
|
||||
MAP_SDK_OPERATION_VERSION=1.1.4.1
|
||||
# websocket
|
||||
|
||||
@@ -111,10 +111,10 @@ void setLeadLine(){
|
||||
}
|
||||
void setSignalLine(){
|
||||
if(signalLineObj==1 && signalLineStep>0){
|
||||
_uv.x = (uv.x - 0.5)*signalScale + 0.5; //x方向缩放
|
||||
_uv.x = uv.x;
|
||||
_uv.y = uv.y;
|
||||
signalLineTexY = _uv.y;
|
||||
_uv = _uv + vec2(0.0,1.0)*signalLineTime;
|
||||
_uv = _uv + vec2(0.0,1.0);
|
||||
}
|
||||
}
|
||||
void setGuideLine(){
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.autonavi.nge.dm;//package com.autonavi.nge.dm;
|
||||
//package com.autonavi.nge.dm;
|
||||
//
|
||||
//import android.os.RemoteException;
|
||||
//import android.util.Log;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.autonavi.nge.guidance;//package com.autonavi.nge.guidance;
|
||||
//package com.autonavi.nge.guidance;
|
||||
//
|
||||
//import android.util.Log;
|
||||
//
|
||||
|
||||
@@ -10,11 +10,88 @@ class HDMapProvider {
|
||||
/**f:设置redis源。1,测试redis(42)。非1,正式redis(根据域名访问的)。默认,非1 */
|
||||
@JvmStatic external fun setDataRedisSource(source: Int)
|
||||
|
||||
/** 是否开启地图数据调试信息的展示*/
|
||||
@JvmStatic external fun toggleMapDataDebugInfo(open: Boolean)
|
||||
|
||||
/** 是否开启Systrace*/
|
||||
@JvmStatic external fun toggleSystrace(open: Boolean)
|
||||
|
||||
/**
|
||||
* 设置Redis数据加载回调
|
||||
*/
|
||||
@JvmStatic external fun setRedisDataLoadCallback(callback: IRedisLoadCallback)
|
||||
|
||||
init {
|
||||
System.loadLibrary("hdmap")
|
||||
}
|
||||
}
|
||||
|
||||
interface IRedisLoadCallback {
|
||||
/**
|
||||
* 登录开始
|
||||
*/
|
||||
fun onLoginStart(ip: String, port: Int, password: String, dbIndex: Int) { }
|
||||
|
||||
/**
|
||||
* 登录失败
|
||||
*/
|
||||
fun onLoginFailed(error: String?) { }
|
||||
|
||||
/**
|
||||
* 登录成功
|
||||
*/
|
||||
fun onLoginSuccess() { }
|
||||
|
||||
/**
|
||||
* 登录成功之后,重新开始登录
|
||||
* @param isCanRetry: true -> 可以再次重试; false-> 不可以再次重试
|
||||
*/
|
||||
fun onReLogin(isCanRetry: Boolean) { }
|
||||
|
||||
/**
|
||||
* 请求 加载指定瓦片数据 开始
|
||||
* @param layerId: redis中指哈希表中的键
|
||||
* @param tileId: 要获取的指定瓦片ID的数据
|
||||
*/
|
||||
fun onTileLoadStart(layerId: String, tileId: String) { }
|
||||
|
||||
/**
|
||||
* 请求加载瓦片数据成功
|
||||
* @param layerId: redis中指哈希表中的键
|
||||
* @param tileId: 要获取的指定瓦片ID的数据
|
||||
*/
|
||||
fun onTileLoadSuccess(layerId: String, tileId: String) { }
|
||||
|
||||
/**
|
||||
* 请求加载瓦片数据失败
|
||||
* @param layerId: redis中指哈希表中的键
|
||||
* @param tileId: 要获取的指定瓦片ID的数据
|
||||
*/
|
||||
fun onTileLoadFail(layerId: String, tileId: String, error: String) { }
|
||||
|
||||
/**
|
||||
* 请求同时加载多个瓦片数据开始
|
||||
* @param layerId: redis中指哈希表中的键
|
||||
* @param tileIds: 要获取的指定瓦片ID列表的集合
|
||||
*/
|
||||
fun onTilesLoadStart(layerId: String, tileIds: List<String>) { }
|
||||
|
||||
/**
|
||||
* 同时加载多个瓦片数据成功
|
||||
* @param layerId: redis中指哈希表中的键
|
||||
* @param tileIds: 要获取的指定瓦片ID列表的集合
|
||||
*/
|
||||
fun onTilesLoadSuccess(layerId: String, tileIds: List<String>) { }
|
||||
|
||||
/**
|
||||
* 同时加载多个瓦片数据失败
|
||||
* @param layerId: redis中指哈希表中的键
|
||||
* @param tileIds: 要获取的指定瓦片ID列表的集合
|
||||
* @param error: 加载失败的异常信息
|
||||
*/
|
||||
fun onTilesLoadFail(layerId: String, tileIds: List<String>, error: String?) { }
|
||||
}
|
||||
|
||||
fun getLaneCenterLine(tileId: Int, routeId: Int): ArrayList<HDMapBlock>? {
|
||||
return if (mObj != 0L) {
|
||||
getLaneCenterLineJni(mObj, tileId, routeId)
|
||||
|
||||
@@ -27,7 +27,7 @@ interface IMarkerController {
|
||||
/**
|
||||
* 批量更新他车
|
||||
*/
|
||||
fun updateBatchMarkerPositon(batchMarkerOptions: com.zhidaoauto.map.sdk.open.renders.marker.BatchMarkerOptions)
|
||||
fun updateBatchMarkerPositon(batchMarkerOptions: BatchMarkerOptions)
|
||||
//根据车辆类型预添加车辆模型
|
||||
fun addPreVehicleModel(type:Int,modelRes:Int):String?
|
||||
//添加普通模型
|
||||
|
||||
@@ -93,6 +93,9 @@ class RoadHelper private constructor() {
|
||||
cacheHdDataProgressJob?.cancel()
|
||||
cacheHdDataProgressJob = null
|
||||
|
||||
mHdDataDownloadListener?.clear()
|
||||
mHdDataDownloadListener = null
|
||||
|
||||
cancelCacheHDData()
|
||||
|
||||
hdMapProvider.release()
|
||||
|
||||
@@ -26,6 +26,8 @@ class MarkerSimpleData {
|
||||
var color: String = ""
|
||||
//颜色设置类型 0 直接替换 1=由原色变为指定色 有方向 * 2=由指定色变为原色 有方向 * 3=由原色变为指定色 无方向 * 4=由指定色变为原色 无方向
|
||||
var colorType: Int = 0
|
||||
// 变色角度
|
||||
var colorAngle:Int = 0
|
||||
//文本
|
||||
var text: String = ""
|
||||
//状态
|
||||
|
||||
@@ -341,16 +341,17 @@ open class MapAutoView : FrameLayout, LonLatPointListener, ITraffic,ILockLocatio
|
||||
mEventController = MapEventController()
|
||||
}
|
||||
|
||||
mMapView?.let {
|
||||
mMapView?.let { itx ->
|
||||
if (CompileConfig.DEBUG) {
|
||||
Log.i(TAG, "autoop-mapop-create--${mMapView}")
|
||||
}
|
||||
it.setEventController(mEventController)
|
||||
addView(it)
|
||||
itx.setEventController(mEventController)
|
||||
addView(itx)
|
||||
|
||||
Log.d(TAG, "--- controller assign -->")
|
||||
mMapController =
|
||||
MapController(context, it, this@MapAutoView, mEventController, mMapStyleParams)
|
||||
|
||||
MapController(context, itx, this@MapAutoView, mEventController, mMapStyleParams)
|
||||
locationClient?.takeIf { it.mMapController == null }?.also { it.mMapController = mMapController }
|
||||
mMapController?.let { mapController ->
|
||||
mMarkerController = MarkerController(mapController)
|
||||
mapController.setMarkerController(mMarkerController)
|
||||
@@ -358,8 +359,8 @@ open class MapAutoView : FrameLayout, LonLatPointListener, ITraffic,ILockLocatio
|
||||
mLocationView = LocationHelper(context, mMarkerController, mMapController,mMapStyleParams)
|
||||
mMapController?.setLocalView(mLocationView)
|
||||
|
||||
it.setMapController(mMapController)
|
||||
it.mITraffic = this@MapAutoView
|
||||
itx.setMapController(mMapController)
|
||||
itx.mITraffic = this@MapAutoView
|
||||
// init PanelManager
|
||||
mPanelManager = PanelManager(this@MapAutoView, context, mMapController)
|
||||
}
|
||||
|
||||
@@ -51,8 +51,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
// 高精地图
|
||||
// implementation rootProject.ext.dependencies.mogocustommap
|
||||
implementation project(':libraries:mapmodule')
|
||||
implementation rootProject.ext.dependencies.mogocustommap
|
||||
|
||||
// 高德地图
|
||||
api rootProject.ext.dependencies.amapnavi3dmap
|
||||
|
||||
@@ -44,7 +44,7 @@ include ':libraries:mogo-map'
|
||||
include ':libraries:mogo-adas'
|
||||
include ':libraries:mogo-adas-data'
|
||||
include ':libraries:mogo-obu'
|
||||
include ':libraries:mapmodule'
|
||||
//include ':libraries:mapmodule'
|
||||
|
||||
// 语音
|
||||
include ':tts:tts-base'
|
||||
|
||||
Reference in New Issue
Block a user