[6.2.6][Opt]Taxi乘客屏添加光缆、信号线

This commit is contained in:
chenfufeng
2023-12-26 19:18:48 +08:00
parent e14dcf15dc
commit 1e64497624

View File

@@ -10,6 +10,7 @@ import android.text.TextUtils
import android.view.MotionEvent
import android.view.View
import com.autonavi.nge.map.OnMapScreenShotListener
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.deva.chain.ChainConstant
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
import com.mogo.eagle.core.data.map.MogoLatLng
@@ -22,6 +23,7 @@ import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager.invoke
import com.mogo.eagle.core.function.call.map.CallerMapRomaListener.invokeMapRomaRange
import com.mogo.eagle.core.function.call.map.CallerMapRomaListener.invokeMapRomaStatus
import com.mogo.eagle.core.function.call.map.CallerMapScreenListenerManager
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i
@@ -64,7 +66,7 @@ import kotlin.properties.Delegates
class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIController,
OnMapLoadedListener, OnMapClickListener, OnMapTouchListener,
OnMarkClickListener, OnMapStyleListener, OnMapViewVisualAngleChangeListener, OnRoadInfoListener,
ILog, OnRoamStatusListener, OnRoadSideFenceRegionListener,OnMapScreenShotListener {
ILog, OnRoamStatusListener, OnRoadSideFenceRegionListener, OnMapScreenShotListener {
companion object {
private const val TAG = "AMapViewWrapper"
@@ -126,7 +128,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
mMapView.setOnRoamStatusListener(this)
mMapView.setOnMapViewVisualAngleChangeListener(this)
mMapView.setOnRoadInfoListener(this, 1)
mMapView.setOnRoadSideFenceRegionListener(this,5000)
mMapView.setOnRoadSideFenceRegionListener(this, 5000)
mMapView.registerScreenListener(this)
registerLogListener(this, mMapView.getEventController())
d(M_MAP + TAG, "initListeners - setOnMapStyleListener - view $mMapView")
@@ -197,7 +199,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
override fun onMapLoaded() {
i(M_MAP + TAG, "onMapLoaded: ")
if (checkAMapView()) {
val hdVisibleArray = intArrayOf(
val hdVisibleArray = arrayListOf(
HDTypes.DIVIDER.type,
HDTypes.ROAD_AREA.type,
HDTypes.STOP_LINE.type,
@@ -216,8 +218,16 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
HDTypes.regional.type,
HDTypes.geometricLinear.type,
HDTypes.geometricSurface.type,
HDTypes.poi.type)
mMapView.getMapAutoViewHelper()!!.setHDTypeVisible(hdVisibleArray)
HDTypes.poi.type
)
if (AppIdentityModeUtils.isTaxiPassenger(
FunctionBuildConfig.appIdentityMode
)
) {
hdVisibleArray.add(HDTypes.CABLE.type)
hdVisibleArray.add(HDTypes.SIGNAL_LINE.type)
}
mMapView.getMapAutoViewHelper()!!.setHDTypeVisible(hdVisibleArray.toIntArray())
loadPreVehicleModel()
}
}
@@ -610,7 +620,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
if (count >= 3) {
return@post
}
handler.postDelayed({ changeCurrentIcon(iconId) },300L)
handler.postDelayed({ changeCurrentIcon(iconId) }, 300L)
reChangeIconCount.set(0)
}
}
@@ -656,15 +666,19 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
MapAutoApi.MAP_STYLE_DAY, MapAutoApi.MAP_STYLE_DAY_NAV -> {
mCurrentUI = EnumMapUI.MAP_STYLE_DAY_NAV
}
MapAutoApi.MAP_STYLE_NIGHT -> {
mCurrentUI = EnumMapUI.MAP_STYLE_NIGHT
}
MapAutoApi.MAP_STYLE_NIGHT_NAV -> {
mCurrentUI = EnumMapUI.MAP_STYLE_NIGHT_NAV
}
MapAutoApi.MAP_STYLE_NIGHT_VR -> {
mCurrentUI = EnumMapUI.MAP_STYLE_NIGHT_VR
}
MapAutoApi.MAP_STYLE_DAY_VR -> {
mCurrentUI = EnumMapUI.MAP_STYLE_DAY_VR
}
@@ -753,9 +767,15 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
private fun addPreVehicleModelWeiZhi(typeTrafficId: TrafficTypeEnum, logMsg: String) {
// 根据当前的地图皮肤模式动态替换
val preVehicleStrWeiZhi: String? = if (isDayMode) {
map.addPreVehicleModel(typeTrafficId.type, TrafficTypeEnum.getMarker3DRes(typeTrafficId.type))
map.addPreVehicleModel(
typeTrafficId.type,
TrafficTypeEnum.getMarker3DRes(typeTrafficId.type)
)
} else {
map.addPreVehicleModel(typeTrafficId.type, TrafficTypeEnum.getMarkerNight3DRes(typeTrafficId.type))
map.addPreVehicleModel(
typeTrafficId.type,
TrafficTypeEnum.getMarkerNight3DRes(typeTrafficId.type)
)
}
d(M_MAP + TAG, logMsg + preVehicleStrWeiZhi)
if (preVehicleStrWeiZhi == null) {
@@ -893,7 +913,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
}
override fun getMapScreenShot() {
if(checkAMapView()){
if (checkAMapView()) {
mMapView.getMapAutoViewHelper()?.toScreen()
}
}
@@ -905,6 +925,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
}
return MODE_MEDIUM_SIGHT
}
/**
* 高精地图屏幕截图
*/