[3.1.0] m2路线id不同,清除全览轨迹
This commit is contained in:
@@ -15,4 +15,5 @@ interface DrivingInfoCallback {
|
|||||||
fun showNoTaskView(isTrue : Boolean)
|
fun showNoTaskView(isTrue : Boolean)
|
||||||
fun updateLineStations(stations: MutableList<BusStationBean>)
|
fun updateLineStations(stations: MutableList<BusStationBean>)
|
||||||
fun updateStationsInfo(stations: MutableList<BusStationBean>, i: Int, isArrived: Boolean)
|
fun updateStationsInfo(stations: MutableList<BusStationBean>, i: Int, isArrived: Boolean)
|
||||||
|
fun clearCustomPolyline()
|
||||||
}
|
}
|
||||||
@@ -421,6 +421,12 @@ class PM2DrivingModel private constructor() {
|
|||||||
updateLocalOrder()
|
updateLocalOrder()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (routesResult != null && routesResult!!.lineId != result.lineId){
|
||||||
|
d(SceneConstant.M_BUS_P+TAG, "lineId change= clearCustomPolyline")
|
||||||
|
mDrivingInfoCallback?.clearCustomPolyline()
|
||||||
|
}
|
||||||
|
|
||||||
d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate= update")
|
d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate= update")
|
||||||
routesResult = result
|
routesResult = result
|
||||||
|
|
||||||
|
|||||||
@@ -116,6 +116,12 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun clearCustomPolyline() {
|
||||||
|
ThreadUtils.runOnUiThread {
|
||||||
|
mView?.clearCustomPolyline()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun updateAutoStatus(isOpen: Boolean) {
|
override fun updateAutoStatus(isOpen: Boolean) {
|
||||||
ThreadUtils.runOnUiThread {
|
ThreadUtils.runOnUiThread {
|
||||||
mView?.updateAutoStatus(isOpen)
|
mView?.updateAutoStatus(isOpen)
|
||||||
@@ -125,4 +131,6 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) :
|
|||||||
override fun updateAutoStatus(status: Int) {
|
override fun updateAutoStatus(status: Int) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -28,8 +28,6 @@ import kotlin.math.roundToInt
|
|||||||
class PM2DrivingInfoFragment :
|
class PM2DrivingInfoFragment :
|
||||||
MvpFragment<PM2DrivingInfoFragment?, PM2DrivingPresenter?>() {
|
MvpFragment<PM2DrivingInfoFragment?, PM2DrivingPresenter?>() {
|
||||||
|
|
||||||
// private var timeHandler: TimeHandler? = null
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 改变自动驾驶状态
|
* 改变自动驾驶状态
|
||||||
*
|
*
|
||||||
@@ -108,7 +106,6 @@ class PM2DrivingInfoFragment :
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
// timeHandler?.removeCallbacksAndMessages(null)
|
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
overMapView?.let{
|
overMapView?.let{
|
||||||
it.onDestroy()
|
it.onDestroy()
|
||||||
@@ -142,9 +139,7 @@ class PM2DrivingInfoFragment :
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setLineInfoView(isShow: Boolean){
|
private fun setLineInfoView(isShow: Boolean){
|
||||||
if (isShow){
|
if (!isShow){
|
||||||
|
|
||||||
}else{
|
|
||||||
updateNoOrderUI()
|
updateNoOrderUI()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -155,11 +150,14 @@ class PM2DrivingInfoFragment :
|
|||||||
overMapView?.let {
|
overMapView?.let {
|
||||||
it.clearSiteMarkers()
|
it.clearSiteMarkers()
|
||||||
}
|
}
|
||||||
|
clearCustomPolyline()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun clearCustomPolyline(){
|
||||||
overMapView?.let {
|
overMapView?.let {
|
||||||
it.clearCustomPolyline()
|
it.clearCustomPolyline()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateNoStationView(){
|
private fun updateNoStationView(){
|
||||||
station_name_tv.setTextColor(resources.getColor(R.color.m2_next_tv_color))
|
station_name_tv.setTextColor(resources.getColor(R.color.m2_next_tv_color))
|
||||||
station_name_tv.text = resources.getString(R.string.m2_p_empty_tv)
|
station_name_tv.text = resources.getString(R.string.m2_p_empty_tv)
|
||||||
@@ -259,7 +257,7 @@ class PM2DrivingInfoFragment :
|
|||||||
tv_arrived_notice.visibility = View.GONE
|
tv_arrived_notice.visibility = View.GONE
|
||||||
}
|
}
|
||||||
// 有线路到达站点
|
// 有线路到达站点
|
||||||
fun haveLineAndArrivedStation(){
|
private fun haveLineAndArrivedStation(){
|
||||||
group_not_select_line.visibility = View.GONE
|
group_not_select_line.visibility = View.GONE
|
||||||
group_stationinfo.visibility = View.VISIBLE
|
group_stationinfo.visibility = View.VISIBLE
|
||||||
clg_distance_left_time.visibility = View.GONE
|
clg_distance_left_time.visibility = View.GONE
|
||||||
@@ -268,6 +266,5 @@ class PM2DrivingInfoFragment :
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val TAG = PM2DrivingInfoFragment::class.java.simpleName
|
private val TAG = PM2DrivingInfoFragment::class.java.simpleName
|
||||||
const val LOOP_TIME_TEXT = 10 * 1000L
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user