[6.7.0] fix bug

This commit is contained in:
EmArrow
2024-09-23 19:32:09 +08:00
parent 7b707e8bc9
commit e4f281cafc
10 changed files with 43 additions and 132 deletions

View File

@@ -119,15 +119,12 @@ class RoadCrossCameraManager : IMoGoMapRoadListener {
val builder =
Point.Options.Builder(TAG, Level.MAP_MARKER)
.setId(cameraDeviceInfo.deviceIp)
// .anchor(0.5f, 1f)
.anchor(0.5f, 0.5f)
// .scale(0.6f)
.anchor(0.5f, 1f)
.scale(1.3f)
.set3DMode(true)
// .flat(false)
.isUseGps(true)
.controlAngle(false)
.icon3DRes(R.raw.cross_road_camera)
// .icon(BitmapFactory.decodeResource(it.resources, R.drawable.road_camera))
.moveToCenter(false)
.longitude(cameraDeviceInfo.lon)
.latitude(cameraDeviceInfo.lat)

View File

@@ -1,76 +0,0 @@
package com.mogo.eagle.core.function.view
import android.content.Context
import android.util.AttributeSet
import android.view.View
import android.view.ViewGroup
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
import com.mogo.eagle.core.function.map.R
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import me.jessyan.autosize.utils.AutoSizeUtils
class CameraMarkerView(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) :
androidx.appcompat.widget.AppCompatImageView(context, attrs, defStyleAttr),
IMoGoSkinModeChangeListener {
companion object {
private const val TAG = "CameraMarkerView"
}
init {
if (this.layoutParams == null) {
this.setLayoutParams(
ViewGroup.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT
)
)
}
modeChange(CallerSkinModeListenerManager.getMode())
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerSkinModeListenerManager.addListener(TAG, this)
}
override fun onSkinModeChange(skinMode: Int) {
ThreadUtils.runOnUiThread {
modeChange(skinMode)
}
}
private fun modeChange(mode: Int) {
when (mode) {
0 -> {
setImageResource(R.drawable.map_marker_camera_view_select)
resize(106, 121)
}
1 -> {
setImageResource(R.drawable.map_marker_camera_view_right_light_select)
resize(74, 83)
}
else -> {
setImageResource(R.drawable.map_marker_camera_view_select)
resize(106, 121)
}
}
}
private fun resize(width: Int, height: Int) {
//设置宽高
val params = layoutParams
params.width = AutoSizeUtils.dp2px(context, width.toFloat())
params.height = AutoSizeUtils.dp2px(context, height.toFloat())
layoutParams = params
requestLayout()
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerSkinModeListenerManager.removeListener(TAG)
}
}

View File

@@ -192,22 +192,22 @@ class RoadCrossRoamView @JvmOverloads constructor(
private fun attachView() {
// 没有路线不做提示
// if (CallerAutoPilotStatusListenerManager.getLineId() == 0L) {
// return
// }
// // 处于漫游模式下不做处理
// if (CallerMapIdentifyManager.roam.second) {
// if (CallerMapIdentifyManager.roam.first != TAG) {
// ToastUtils.showLong("正在漫游中,不展示路口漫游")
// }
// CallerLogger.d("$M_MAP$TAG", "正在漫游中,不展示路口漫游")
// return
// }
// // 首页被遮挡不做提示
// if (!CallerHmiViewControlListenerManager.getMainPageVisible()) {
// CallerLogger.d("$M_MAP$TAG", "attachView return , mainPageVisible is false")
// return
// }
if (CallerAutoPilotStatusListenerManager.getLineId() == 0L) {
return
}
// 处于漫游模式下不做处理
if (CallerMapIdentifyManager.roam.second) {
if (CallerMapIdentifyManager.roam.first != TAG) {
ToastUtils.showLong("正在漫游中,不展示路口漫游")
}
CallerLogger.d("$M_MAP$TAG", "正在漫游中,不展示路口漫游")
return
}
// 首页被遮挡不做提示
if (!CallerHmiViewControlListenerManager.getMainPageVisible()) {
CallerLogger.d("$M_MAP$TAG", "attachView return , mainPageVisible is false")
return
}
//播放语音
val dis = CallerMapRoadListenerManager.getStopLineDistance()?.toInt() ?: 0
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {