[6.7.0][Fix]解决行程总览车模图片显示的问题
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
app:endPointDrawable="@drawable/taxi_overmap_endpoint"
|
||||
app:mapStyleExtraPath="over_view_style_extra.data"
|
||||
app:mapStylePath="over_view_style.data"
|
||||
app:isOrderEnd="true"
|
||||
app:resetDrawable="@null"
|
||||
app:leftPadding="70"
|
||||
app:topPadding="70"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
app:rightPadding="580"
|
||||
app:startPointDrawable="@drawable/taxt_u_p_map_view_dir_start"
|
||||
app:topPadding="210"
|
||||
app:isOrderEnd="true"
|
||||
app:unArrivedDrawable="@drawable/taxt_u_p_overmap_arriving" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
@@ -22,7 +22,7 @@ class DataCenterBizProvider:IDataCenterBizProvider {
|
||||
}
|
||||
|
||||
override fun notifyCarMode(carModel: Carmodel) {
|
||||
CallerDataCenterBizListener.invokeCarRes(carModel.resId)
|
||||
CallerDataCenterBizListener.invokeCarModel(carModel)
|
||||
}
|
||||
|
||||
override fun notifyPlateNumber(plateNumber: String?) {
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
app:mapStyleExtraPath="over_view_style_extra.data"
|
||||
app:mapStylePath="over_view_style.data"
|
||||
app:resetDrawable="@null"
|
||||
app:isOrderEnd="true"
|
||||
app:startPointDrawable="@drawable/taxt_u_p_map_view_dir_start"
|
||||
app:unArrivedDrawable="@drawable/taxt_u_p_overmap_arriving" />
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
app:mapStyleExtraPath="style_extra.data"
|
||||
app:mapStylePath="style.data"
|
||||
app:resetDrawable="@null"
|
||||
app:isOrderEnd="true"
|
||||
app:startPointDrawable="@drawable/taxt_u_p_map_view_dir_start"
|
||||
app:unArrivedDrawable="@drawable/taxt_u_p_overmap_arriving" />
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
android:layout_marginStart="1530dp"
|
||||
android:layout_marginTop="1204dp"
|
||||
app:bottomPadding="160"
|
||||
app:carDrawable="@drawable/taxt_u_p_map_car"
|
||||
app:compassDrawable="@drawable/taxt_u_p_map_car_light"
|
||||
app:endPointDrawable="@drawable/taxi_overmap_endpoint"
|
||||
app:globalPathColor="#39BA90"
|
||||
|
||||
@@ -151,7 +151,8 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
private var topPadding: Int = 150
|
||||
private var rightPadding: Int = 100
|
||||
private var bottomPadding: Int = 300
|
||||
private var isSmaller = false
|
||||
// 订单结束弹窗
|
||||
private var isOrderEnd = false
|
||||
|
||||
// 绘制智慧道路的范围
|
||||
private var roadRange = 56f
|
||||
@@ -275,7 +276,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
topPadding = typedArray.getInt(R.styleable.TravelRealityView_topPadding, 0)
|
||||
rightPadding = typedArray.getInt(R.styleable.TravelRealityView_rightPadding, 0)
|
||||
bottomPadding = typedArray.getInt(R.styleable.TravelRealityView_bottomPadding, 0)
|
||||
isSmaller = typedArray.getBoolean(R.styleable.TravelRealityView_isSmaller, false)
|
||||
isOrderEnd = typedArray.getBoolean(R.styleable.TravelRealityView_isOrderEnd, false)
|
||||
typedArray.recycle()
|
||||
initView(context)
|
||||
} catch (e: Exception) {
|
||||
@@ -393,8 +394,13 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
BitmapDescriptorFactory.fromResource(if (roadRangeDrawable != -1) roadRangeDrawable else R.drawable.mogo_road_over)
|
||||
roadTrajectoryBitmap =
|
||||
BitmapDescriptorFactory.fromResource(if (roadTrajectoryDrawable != -1) roadTrajectoryDrawable else R.drawable.road_trajectory_arrow_nor)
|
||||
// initTravelRealityMapView()
|
||||
initSmallMapView(true)
|
||||
if (!isOrderEnd) {
|
||||
isSmallMap = true
|
||||
initSmallMapView(true)
|
||||
} else {
|
||||
isSmallMap = false
|
||||
initTravelRealityMapView(true)
|
||||
}
|
||||
}
|
||||
|
||||
private fun changeMapSettings(isSmallMap: Boolean) {
|
||||
@@ -644,7 +650,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
roadTrackList = it
|
||||
isRoadTrackReq = false
|
||||
// 司机屏默认显示小地图的渲染,乘客屏默认显示行程总览地图的渲染
|
||||
if (!AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) || !isSmallMap) {
|
||||
if (!AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) || isOrderEnd || !isSmallMap) {
|
||||
handleRoadTrajectories(it, reqData)
|
||||
}
|
||||
}, onError = {
|
||||
@@ -1900,8 +1906,13 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
mCarMarker!!.rotateAngle = angle
|
||||
mCarMarker!!.position = latLng
|
||||
} else {
|
||||
val carRes = if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
R.drawable.map_car_icon
|
||||
} else {
|
||||
R.drawable.map_bus_common_icon
|
||||
}
|
||||
val option = MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(if (carDrawable != -1) carDrawable else R.drawable.map_car_icon))
|
||||
.icon(BitmapDescriptorFactory.fromResource(if (carDrawable != -1) carDrawable else carRes))
|
||||
.rotateAngle(360 - location.heading.toFloat())
|
||||
.position(LatLng(location.latitude, location.longitude))
|
||||
.anchor(0.5f, 0.5f)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<attr name="topPadding" />
|
||||
<attr name="rightPadding" />
|
||||
<attr name="bottomPadding" />
|
||||
<!-- 是否是小窗口显示 -->
|
||||
<attr name="isSmaller" format="boolean" />
|
||||
<!-- 是否是订单结束页显示 -->
|
||||
<attr name="isOrderEnd" format="boolean" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.call.datacenter
|
||||
|
||||
import com.mogo.eagle.core.data.enums.Carmodel
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.data.och.OchInfo
|
||||
import com.mogo.eagle.core.function.api.datacenter.IDataCenterBizListener
|
||||
@@ -8,6 +9,9 @@ import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
object CallerDataCenterBizListener : CallerBase<IDataCenterBizListener>() {
|
||||
|
||||
@Volatile
|
||||
private var carModel: Carmodel? = null
|
||||
|
||||
@Volatile
|
||||
private var res: Int = 0
|
||||
|
||||
@@ -41,8 +45,9 @@ object CallerDataCenterBizListener : CallerBase<IDataCenterBizListener>() {
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeCarRes(res: Int) {
|
||||
this.res = res
|
||||
fun invokeCarModel(carModel: Carmodel) {
|
||||
this.carModel = carModel
|
||||
this.res = carModel.resId
|
||||
M_LISTENERS.forEach {
|
||||
it.value.invokeCarRes(res)
|
||||
}
|
||||
@@ -107,4 +112,8 @@ object CallerDataCenterBizListener : CallerBase<IDataCenterBizListener>() {
|
||||
fun getOrderId(): String {
|
||||
return orderId
|
||||
}
|
||||
|
||||
fun getCarModel(): Carmodel? {
|
||||
return carModel
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
Reference in New Issue
Block a user