[6.0.0] roam change
This commit is contained in:
@@ -292,9 +292,16 @@
|
||||
app:layout_constraintBottom_toBottomOf="@id/module_mogo_och_badcase_rl"
|
||||
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_badcase_rl"
|
||||
app:layout_constraintTop_toTopOf="@id/module_mogo_och_badcase_rl"
|
||||
app:roma_open_bg="@drawable/bus_operation_status_select_bg"
|
||||
app:roma_close_bg="@drawable/bus_operation_status_bg"
|
||||
/>
|
||||
app:roma_open_bg="@drawable/bus_operation_status_select_bg" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.RomaDistanceView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<com.mogo.och.bus.view.SlidePanelView
|
||||
android:id="@+id/module_mogo_och_slide_panel"
|
||||
|
||||
@@ -8,17 +8,15 @@
|
||||
android:id="@+id/mapBizView"
|
||||
android:layout_width="1810dp"
|
||||
android:layout_height="match_parent"
|
||||
app:isWeatherEnable="false"
|
||||
app:locationIcon3DRes="@raw/xiaoba"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.BusPStatusBarView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugViewTrigger
|
||||
android:layout_width="@dimen/dp_400"
|
||||
@@ -32,14 +30,23 @@
|
||||
android:id="@+id/romaPView"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:background="@drawable/roma_bus_p_bg_selector"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:layout_marginLeft="10dp"
|
||||
app:layout_constraintLeft_toRightOf="@+id/video_switch_iv"
|
||||
app:roma_close="@drawable/roma_bus_p_bg_selector"
|
||||
app:roma_open="@drawable/iv_roma_bus_passenger_press_bg" />
|
||||
|
||||
<!-- <com.mogo.eagle.core.function.hmi.ui.widget.RomaDistanceView-->
|
||||
<!-- android:layout_width="@dimen/dp_334"-->
|
||||
<!-- android:layout_height="@dimen/dp_120"-->
|
||||
<!-- android:layout_marginLeft="@dimen/dp_50"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_20"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintLeft_toRightOf="@+id/romaPView"-->
|
||||
<!-- app:roma_change_dis_color="true" />-->
|
||||
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -57,7 +64,7 @@
|
||||
android:layout_marginTop="@dimen/dp_112"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/bus_p_route_panel"
|
||||
@@ -69,23 +76,22 @@
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.BusPassengerMsgBoxBubbleView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginLeft="@dimen/dp_40"
|
||||
android:layout_marginTop="@dimen/dp_100"
|
||||
/>
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/video_switch_iv"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:src="@drawable/video_btn_selector"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_20"/>
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/video_btn_selector"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -317,6 +317,14 @@
|
||||
app:roma_close_bg="@drawable/taxi_operation_status_bg"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.RomaDistanceView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/module_och_taxi_ai_collect_ll"-->
|
||||
<!-- android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"-->
|
||||
|
||||
@@ -84,6 +84,15 @@
|
||||
app:roma_close="@drawable/roma_taxi_p_bg_selector"
|
||||
app:roma_open="@drawable/taxi_p_roma_checked" />
|
||||
|
||||
<!-- <com.mogo.eagle.core.function.hmi.ui.widget.RomaDistanceView-->
|
||||
<!-- android:layout_width="@dimen/dp_334"-->
|
||||
<!-- android:layout_height="@dimen/dp_120"-->
|
||||
<!-- android:layout_marginLeft="@dimen/dp_50"-->
|
||||
<!-- android:layout_marginTop="100dp"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:layout_constraintLeft_toRightOf="@+id/romaPView"-->
|
||||
<!-- app:roma_change_dis_color="true"/>-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rv_location_center"
|
||||
android:layout_width="@dimen/dp_96"
|
||||
|
||||
@@ -317,6 +317,13 @@
|
||||
app:roma_close_bg="@drawable/taxi_operation_status_bg"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.RomaDistanceView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/module_och_taxi_ai_collect_ll"-->
|
||||
<!-- android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"-->
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
@@ -9,20 +8,19 @@
|
||||
android:id="@+id/overMapView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:resetDrawable="@null"
|
||||
app:startPointDrawable="@drawable/taxi_p_map_view_dir_start"
|
||||
app:endPointDrawable="@drawable/taxi_p_map_view_dir_end"
|
||||
app:arrivedDrawable="@drawable/taxi_overmap_arrived"
|
||||
app:bottomPadding="160"
|
||||
app:carDrawable="@drawable/taxi_p_map_car"
|
||||
app:compassDrawable="@drawable/taxi_p_map_car_light"
|
||||
app:arrivedDrawable="@drawable/taxi_overmap_arrived"
|
||||
app:unArrivedDrawable="@drawable/taxi_overmap_arriving"
|
||||
app:endPointDrawable="@drawable/taxi_p_map_view_dir_end"
|
||||
app:leftPadding="800"
|
||||
app:mapStyleExtraPath="style_extra.data"
|
||||
app:mapStylePath="style.data"
|
||||
app:leftPadding="800"
|
||||
app:resetDrawable="@null"
|
||||
app:rightPadding="160"
|
||||
app:startPointDrawable="@drawable/taxi_p_map_view_dir_start"
|
||||
app:topPadding="160"
|
||||
app:bottomPadding="160"
|
||||
/>
|
||||
app:unArrivedDrawable="@drawable/taxi_overmap_arriving" />
|
||||
|
||||
<!-- 视频播放View -->
|
||||
<com.mogo.och.taxi.passenger.ui.video.InfoVideoView
|
||||
@@ -34,7 +32,7 @@
|
||||
<com.mogo.eagle.core.function.view.MapBizView
|
||||
android:id="@+id/mapBizView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||
@@ -42,11 +40,11 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:layout_marginBottom="@dimen/dp_255"
|
||||
app:pnc_size="@dimen/dp_44"
|
||||
app:background_resource="@drawable/taxi_p_pnc_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:pnc_size="@dimen/dp_44" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/ck_setting"
|
||||
@@ -81,6 +79,16 @@
|
||||
app:roma_close="@drawable/roma_taxi_p_bg_selector"
|
||||
app:roma_open="@drawable/taxi_p_roma_checked" />
|
||||
|
||||
<!-- <com.mogo.eagle.core.function.hmi.ui.widget.RomaDistanceView-->
|
||||
<!-- android:layout_width="@dimen/dp_334"-->
|
||||
<!-- android:layout_height="@dimen/dp_120"-->
|
||||
<!-- android:layout_marginLeft="@dimen/dp_50"-->
|
||||
<!-- android:layout_marginTop="100dp"-->
|
||||
<!-- android:background="@drawable/layer_roma_distance_bg"-->
|
||||
<!-- app:layout_constraintLeft_toRightOf="@+id/romaPView"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:roma_change_dis_color="true" />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rv_location_center"
|
||||
android:layout_width="@dimen/dp_96"
|
||||
@@ -101,19 +109,17 @@
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:traffic_light_user="traffic_light_taxi_p"
|
||||
/>
|
||||
app:traffic_light_user="traffic_light_taxi_p" />
|
||||
|
||||
<!--转向灯-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.TurnLightViewStatus
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/traffic_light_view"
|
||||
android:layout_marginTop="@dimen/dp_100"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
app:user="taxi_p"
|
||||
/>
|
||||
app:layout_constraintRight_toLeftOf="@id/traffic_light_view"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:user="taxi_p" />
|
||||
|
||||
<!-- 路程信息 -->
|
||||
<com.mogo.och.taxi.passenger.ui.orderinfo.ItineraryView
|
||||
@@ -125,11 +131,11 @@
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="无人化"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<!-- 底部导航栏 -->
|
||||
<com.mogo.och.taxi.passenger.ui.bottom.BottomBar
|
||||
@@ -140,27 +146,26 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_xiaozhi_normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_width="@dimen/dp_216"
|
||||
android:layout_height="@dimen/dp_216"
|
||||
android:layout_marginEnd="@dimen/dp_82"
|
||||
android:layout_marginBottom="@dimen/dp_28"
|
||||
android:layout_width="@dimen/dp_216"
|
||||
android:layout_height="@dimen/dp_216"/>
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!--气泡态消息盒子-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/aciv_xiaozhi_normal"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
/>
|
||||
app:layout_constraintBottom_toTopOf="@id/aciv_xiaozhi_normal"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<com.mogo.och.taxi.passenger.ui.debug.DebugView
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_120"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_120"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.text.Html
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.util.TypedValue
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.api.map.roma.IMoGoRomaListener
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRomaListener
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import kotlinx.android.synthetic.main.view_roma_distance.view.*
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
class RomaDistanceView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) , IMoGoRomaListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "RomaDistanceView"
|
||||
}
|
||||
|
||||
private var disChangeColor = false
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_roma_distance, this, true)
|
||||
val a = context.obtainStyledAttributes(
|
||||
attrs,
|
||||
R.styleable.RomaDistanceView,
|
||||
defStyleAttr,
|
||||
0
|
||||
)
|
||||
// val distanceBg = a.getResourceId(R.styleable.RomaDistanceView_roma_distance_bg,0)
|
||||
// if(distanceBg != 0){
|
||||
// romaDistanceBg.background = resources.getDrawable(distanceBg)
|
||||
// }
|
||||
val txtSize = a.getInteger(R.styleable.RomaDistanceView_roma_txt_size,35)
|
||||
romaDistanceMeter.setTextSize(TypedValue.COMPLEX_UNIT_PX,
|
||||
AutoSizeUtils.dp2px(getContext(),txtSize.toFloat()).toFloat())
|
||||
val txtDisColor = a.getBoolean(R.styleable.RomaDistanceView_roma_change_dis_color,false)
|
||||
disChangeColor = txtDisColor
|
||||
a.recycle()
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerMapRomaListener.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun romaStatus(status: Boolean) {
|
||||
super.romaStatus(status)
|
||||
if (status) {
|
||||
romaDistanceBg.visibility = View.VISIBLE
|
||||
} else {
|
||||
romaDistanceBg.visibility = View.GONE
|
||||
romaDistanceMeter.text = ""
|
||||
}
|
||||
}
|
||||
|
||||
override fun romaDistance(distance: String) {
|
||||
super.romaDistance(distance)
|
||||
val dis = distance.toDouble().toInt()
|
||||
Log.i(TAG, "romaDistance:$distance")
|
||||
if(disChangeColor){
|
||||
romaDistanceMeter.text = Html.fromHtml("漫游距离<font color='#0752C3'>${dis}米</font>")
|
||||
}else{
|
||||
romaDistanceMeter.text = "漫游距离${dis}米"
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerMapRomaListener.removeListener(TAG)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:drawable="@drawable/roma_distance_bg"
|
||||
android:width="@dimen/dp_334"
|
||||
android:height="@dimen/dp_120"/>
|
||||
</layer-list >
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/romaDistanceBg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/romaDistanceMeter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center_horizontal"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:textStyle="bold"
|
||||
android:textSize="@dimen/dp_35"
|
||||
android:textColor="@android:color/white"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -102,4 +102,10 @@
|
||||
<attr name="roma_close_bg" format="reference"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="RomaDistanceView">
|
||||
<attr name="roma_distance_bg" format="reference"/>
|
||||
<attr name="roma_txt_size" format="reference"/>
|
||||
<attr name="roma_change_dis_color" format="boolean"/>
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
@@ -54,7 +54,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener,
|
||||
private const val H_ERROR_MAP = 2
|
||||
private const val H_DELAY_TIME = 3_000L
|
||||
|
||||
var START_METRE = 3
|
||||
var START_METRE = 200
|
||||
var END_METRE = 2000
|
||||
|
||||
@JvmStatic
|
||||
@@ -163,12 +163,14 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener,
|
||||
}
|
||||
|
||||
private fun openRoma() {
|
||||
CallerMapUIServiceManager.getMapUIController()?.visualAngleLock(true)
|
||||
updateLongSightLevel(true)
|
||||
requestRangeOfIdentify(true)
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
private fun closeRoma(manual: Boolean = true) {
|
||||
CallerMapUIServiceManager.getMapUIController()?.visualAngleLock(false)
|
||||
updateLongSightLevel(false)
|
||||
requestRangeOfIdentify(false)
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
@@ -258,11 +260,14 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener,
|
||||
mutableMapOf("romaStart" to "地图漫游动画结束,开始漫游")
|
||||
)
|
||||
showAiCloud.set(true)
|
||||
FunctionBuildConfig.isDrawIdentifyData = false
|
||||
// FunctionBuildConfig.isDrawIdentifyData = false
|
||||
CallerMapRomaListener.invokeMapRoma(true)
|
||||
// 5秒没有触发 则预警日志写入
|
||||
handler.sendEmptyMessageDelayed(H_ERROR_CLOUD, H_DELAY_TIME)
|
||||
}
|
||||
5 -> {
|
||||
CallerMapRomaListener.invokeRomaDistance(msg)
|
||||
}
|
||||
1 -> {
|
||||
val m = Message.obtain()
|
||||
m.what = H_ERROR_MAP
|
||||
@@ -294,7 +299,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener,
|
||||
showAiCloud.set(false)
|
||||
aiCloudDataChange.set(false)
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
FunctionBuildConfig.isDrawIdentifyData = true
|
||||
// FunctionBuildConfig.isDrawIdentifyData = true
|
||||
CallerMapRomaListener.invokeMapRoma(false)
|
||||
if (invokeCloud) {
|
||||
closeRoma(false)
|
||||
|
||||
@@ -11,4 +11,9 @@ interface IMoGoRomaListener {
|
||||
* 漫游状态回调
|
||||
*/
|
||||
fun romaStatus(status:Boolean){}
|
||||
|
||||
/**
|
||||
* 漫游距自车的距离
|
||||
*/
|
||||
fun romaDistance(distance:String){}
|
||||
}
|
||||
@@ -29,4 +29,12 @@ object CallerMapRomaListener : CallerBase<IMoGoRomaListener>() {
|
||||
listener.romaStatus(romaStatus)
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeRomaDistance(distance: String) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.romaDistance(distance)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -80,7 +80,7 @@ MOGO_LOCATION_VERSION=1.4.7.16
|
||||
MOGO_TELEMATIC_VERSION=1.4.7.16
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.14.3.7
|
||||
MAP_SDK_VERSION=2.14.3.9
|
||||
MAP_SDK_OPERATION_VERSION=1.1.4.1
|
||||
# websocket
|
||||
WEBSOCKET_VERSION=1.1.7
|
||||
|
||||
@@ -0,0 +1,411 @@
|
||||
package com.mogo.map.uicontroller;
|
||||
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RawRes;
|
||||
|
||||
import com.mogo.eagle.core.data.map.CenterLine;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.map.hdcache.IHdCacheListener;
|
||||
|
||||
import org.json.JSONObject;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-26
|
||||
* <p>
|
||||
* 地图UI控制
|
||||
*/
|
||||
public interface IMogoMapUIController {
|
||||
|
||||
|
||||
/**
|
||||
* 修改缩放级别
|
||||
*/
|
||||
MapControlResult changeZoom(float zoom);
|
||||
|
||||
|
||||
/**
|
||||
* 修改缩放级别的另一种方式
|
||||
* @param zoom 缩放比例
|
||||
*/
|
||||
void changeZoom2(float zoom);
|
||||
|
||||
/**
|
||||
* 设置地图是否是Debug模式
|
||||
*
|
||||
* @param debugMode 是否开启Debug模式
|
||||
*/
|
||||
void setDebugMode(Boolean debugMode);
|
||||
|
||||
/**
|
||||
* 进入VR 模式
|
||||
*
|
||||
* @param isDayMode true-白天模式,false-夜间模式
|
||||
*/
|
||||
void stepInVrMode(boolean isDayMode);
|
||||
|
||||
/**
|
||||
* 切换3D模式下远距,中距,近距视角
|
||||
*
|
||||
* @param angelMode {@link VisualAngleMode}
|
||||
*/
|
||||
void changeMapVisualAngle(VisualAngleMode angelMode, MogoLatLng mogoLatLng);
|
||||
|
||||
/**
|
||||
* 切换视角锁定,用于启动/关闭漫游
|
||||
* @param lock 锁定值
|
||||
*/
|
||||
void visualAngleLock(boolean lock);
|
||||
|
||||
/**
|
||||
* 设置漫游路径
|
||||
* @param trajectory
|
||||
*/
|
||||
void setRoamTrajectory(String trajectory);
|
||||
|
||||
/**
|
||||
* 设置漫游模式 , 0:自由漫游,1:路径漫游
|
||||
*/
|
||||
void setRomaMode(int mode);
|
||||
|
||||
/**
|
||||
* 获得当前地图视距模式
|
||||
*
|
||||
* @return {@link VisualAngleMode}
|
||||
*/
|
||||
VisualAngleMode getCurrentMapVisualAngle();
|
||||
|
||||
/**
|
||||
* 将地图移动至当前位置
|
||||
*/
|
||||
default void moveToCenter(MogoLatLng latLng) {
|
||||
moveToCenter(latLng, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将地图移动至当前位置
|
||||
*/
|
||||
void moveToCenter(MogoLatLng latLng, boolean animate);
|
||||
|
||||
/**
|
||||
* 是否白天模式
|
||||
* @return
|
||||
*/
|
||||
boolean isDayMode();
|
||||
|
||||
/**
|
||||
* 显示我的位置
|
||||
*
|
||||
* @param visible true - 显示 false - 不显示
|
||||
*/
|
||||
void showMyLocation(boolean visible);
|
||||
|
||||
/**
|
||||
* @param view
|
||||
*/
|
||||
void showMyLocation(View view);
|
||||
|
||||
/**
|
||||
* 获取比例尺数据
|
||||
*
|
||||
* @return 当前缩放级别下,地图上1像素点对应的长度,单位米
|
||||
*/
|
||||
float getScalePerPixel();
|
||||
|
||||
/**
|
||||
* 获取缩放比例
|
||||
*/
|
||||
float getZoomLevel();
|
||||
|
||||
/**
|
||||
* 获取道路的宽度
|
||||
*/
|
||||
float getRoadWidth(double lon, double lat, float angle, boolean isGpsLocation, boolean isRTK);
|
||||
|
||||
/**
|
||||
* 获取视图东北角坐标
|
||||
*/
|
||||
MogoLatLng getCameraNorthEastPosition();
|
||||
|
||||
/**
|
||||
* 获取视图西南角坐标
|
||||
*/
|
||||
MogoLatLng getCameraSouthWestPosition();
|
||||
|
||||
/**
|
||||
* 获取视图中心点坐标
|
||||
*/
|
||||
MogoLatLng getWindowCenterLocation();
|
||||
|
||||
/**
|
||||
* 设置地图中心点
|
||||
*
|
||||
* @param mapCenterX x 点位置x值与地图宽度的比例
|
||||
* @param mapCenterY y 点位置x值与地图高度的比例
|
||||
*/
|
||||
void setPointToCenter(double mapCenterX, double mapCenterY);
|
||||
|
||||
/**
|
||||
* 获取经纬度对应的屏幕的位置
|
||||
*/
|
||||
Point getLocationPointInScreen(MogoLatLng latLng);
|
||||
|
||||
/**
|
||||
* 获取像素点对应的经纬度
|
||||
*/
|
||||
MogoLatLng getLocationMogoLatLngInScreen(Point point);
|
||||
|
||||
/**
|
||||
* 设置刷新帧率
|
||||
*/
|
||||
void setRenderFps(int fps);
|
||||
|
||||
/**
|
||||
* @param tag 调用业务
|
||||
* @param carPosition 当前位置
|
||||
* @param lonLats 经纬度围成的范围
|
||||
* @param bound 地图上可显示的范围
|
||||
* @param lockCarPosition 是否锁定车辆位置
|
||||
*/
|
||||
void showBounds(String tag, MogoLatLng carPosition, List<MogoLatLng> lonLats, Rect bound, boolean lockCarPosition);
|
||||
|
||||
/**
|
||||
* 强制刷新地图
|
||||
*/
|
||||
void forceRender();
|
||||
|
||||
/**
|
||||
* 计算两点之间的距离
|
||||
*
|
||||
* @param p1
|
||||
* @param p2
|
||||
* @return
|
||||
*/
|
||||
float calculateLineDistance(MogoLatLng p1, MogoLatLng p2) throws Exception;
|
||||
|
||||
/**
|
||||
* 锁车状态
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isCarLocked();
|
||||
|
||||
/**
|
||||
* 配置自车图标样式
|
||||
*
|
||||
* @param option 为空时使用
|
||||
* 默认配置
|
||||
*/
|
||||
void setCarCursorOption(@Nullable CarCursorOption option);
|
||||
|
||||
/**
|
||||
* @param type :车尾灯类型 0=默认 1=左黄 2=右黄 3=双黄 4=双红
|
||||
* @param time: 闪烁时间 最小500ms 小于500ms 默认为500ms
|
||||
*/
|
||||
void setCarLightsType(int type, int time);
|
||||
|
||||
/**
|
||||
* 获取地图视图描述快照
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
MapCameraPosition getMapCameraPosition();
|
||||
|
||||
/**
|
||||
* 切换地图视图视角
|
||||
*
|
||||
* @param bearing
|
||||
*/
|
||||
void changeBearing(float bearing);
|
||||
|
||||
/**
|
||||
* 修改地图中心
|
||||
* MapAutoApi.CAR_CENTER_100 = 1
|
||||
* MapAutoApi.CAR_QUARTER_100 = 2
|
||||
* MapAutoApi.CAR_TWO_FIFTHS_100 = 3
|
||||
* MapAutoApi.CAR_TWO_FIFTHS_80= 4
|
||||
* MapAutoApi.CAR_AFTER_30_FRONT_80 = 5
|
||||
* MapAutoApi.CAR_AFTER_30_FRONT_100 = 6
|
||||
* MapAutoApi.CAR_AFTER_30_FRONT_120 = 7
|
||||
* MapAutoApi.CAR_AFTER_40_FRONT_80= 8
|
||||
* MapAutoApi.CAR_AFTER_40_FRONT_100 = 9
|
||||
* MapAutoApi.CAR_AFTER_40_FRONT_120 = 10
|
||||
*/
|
||||
void changeMapViewAngle(int type);
|
||||
|
||||
/**
|
||||
* 修改高精地图自车图标
|
||||
* 传入资源ID
|
||||
*/
|
||||
void changeCurrentIcon(@RawRes int iconId);
|
||||
|
||||
/**
|
||||
* 获取瓦片id
|
||||
*
|
||||
* @param lon 经度
|
||||
* @param lat 纬度
|
||||
* @return 瓦片id
|
||||
*/
|
||||
long getTileId(double lon, double lat);
|
||||
|
||||
|
||||
/**
|
||||
* 获取限速
|
||||
*
|
||||
* @param lon
|
||||
* @param lat
|
||||
* @param angle
|
||||
* @return
|
||||
*/
|
||||
int getLimitSpeed(double lon, double lat, float angle);
|
||||
|
||||
/**
|
||||
* 获取车道中心线信息
|
||||
*
|
||||
* @param lon
|
||||
* @param lat
|
||||
* @param angle
|
||||
* @return
|
||||
*/
|
||||
CenterLine getCenterLineInfo(double lon, double lat, float angle);
|
||||
|
||||
/**
|
||||
* 自研地图是否匹配道路
|
||||
*
|
||||
* @param enable
|
||||
*/
|
||||
default void rtkEnable(boolean enable) {
|
||||
|
||||
}
|
||||
|
||||
default void destroy() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车速资源缓存 id
|
||||
*
|
||||
* @param speedVal
|
||||
* @return
|
||||
*/
|
||||
default String getMarkerInfoResName(String speedVal) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车速资源缓存 id
|
||||
*
|
||||
* @param speedVal
|
||||
* @return
|
||||
*/
|
||||
default void setMarkerInfoResName(String speedVal, String val) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置地图视线角度
|
||||
*/
|
||||
void setMapDAngle(float angle);
|
||||
|
||||
/**
|
||||
* 获取行车方向
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
float getAngle(double startLon, double startLat, double endLon, double endLat);
|
||||
|
||||
/**
|
||||
* 获取当前道路方向
|
||||
*
|
||||
* @return angle
|
||||
*/
|
||||
Double getRoadAngle(Double lon, Double lat, float angle);
|
||||
|
||||
/**
|
||||
* 设置锁屏模式
|
||||
*/
|
||||
void setLockMode(boolean isLock);
|
||||
|
||||
/**
|
||||
* 设置手势滑动失效
|
||||
*/
|
||||
void setScrollGesturesEnable(boolean isEnable);
|
||||
|
||||
/**
|
||||
* 设置所有的滑动失效
|
||||
*/
|
||||
void setAllGesturesEnabled(boolean isEnable);
|
||||
|
||||
/**
|
||||
* 设置外界坐标系
|
||||
*
|
||||
* @param gnssInfo RTK 高精坐标,车辆惯导数据
|
||||
*/
|
||||
void setExtraGPSData(MogoLocation gnssInfo);
|
||||
|
||||
/**
|
||||
* 打开点云绘制
|
||||
*
|
||||
* @param isDrawPointCloud 是否绘制点云
|
||||
*/
|
||||
void setIsDrawPointCloud(Boolean isDrawPointCloud);
|
||||
|
||||
/**
|
||||
* 设制点云大小
|
||||
*
|
||||
* @param pointCloudSize 点云的点大小
|
||||
*/
|
||||
void setPointCloudSize(Float pointCloudSize);
|
||||
|
||||
/**
|
||||
* 设置点云颜色
|
||||
*
|
||||
* @param color // color:"#RRGGBB*
|
||||
*/
|
||||
void setPointCloudColor(String color);
|
||||
void cacheHDDataByCity(IHdCacheListener listener);
|
||||
|
||||
void cacheHDDataByCity(IHdCacheListener listener, MogoLocation location);
|
||||
|
||||
/**
|
||||
* 当前城市离线数据是否已缓存
|
||||
* @return
|
||||
*/
|
||||
boolean isCityDataCached();
|
||||
|
||||
void cancelDownloadCacheData();
|
||||
|
||||
String getCityCode();
|
||||
|
||||
/**
|
||||
* 自动切换视角到指定点,包含过渡动画,并持续指定duration毫秒
|
||||
*
|
||||
* @param lon 经度
|
||||
* @param lat 纬度
|
||||
* @param rotateAngle 旋转角度
|
||||
* @param duration 持续时间
|
||||
* @param isGps 是否是高精坐标
|
||||
*/
|
||||
void animateTo(double lon, double lat, float rotateAngle, int duration, boolean isGps);
|
||||
|
||||
|
||||
/**
|
||||
* 自动切换视角到指定点,包含过渡动画,并持续指定duration毫秒
|
||||
*
|
||||
* @param lon 经度
|
||||
* @param lat 纬度
|
||||
* @param v1 旋转角度
|
||||
* @param v2 持续时间
|
||||
* @param v3
|
||||
* @param v4
|
||||
*/
|
||||
void animateTo(double lon, double lat, float v1, float v2, float v3, float v4, int duration, boolean isGps);
|
||||
}
|
||||
@@ -139,7 +139,7 @@ public class AMapWrapper implements IMogoMap {
|
||||
}
|
||||
long time = markerOptionsArrayList.get(0).getTime();
|
||||
batchMarkerOptions.list = markerOptionsArrayList;
|
||||
// batchMarkerOptions.averageFlag = 0;
|
||||
batchMarkerOptions.averageFlag = 0;
|
||||
batchMarkerOptions.delayStrategy = false;
|
||||
batchMarkerOptions.ruleAngle = 8.0f;
|
||||
batchMarkerOptions.controlIcon = 1;
|
||||
|
||||
Reference in New Issue
Block a user