[6.8.0]
[fea] [2d地图路线展示优化]
This commit is contained in:
@@ -15,6 +15,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.datacenter.CallerDataCenterBizListener
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapGlobalTrajectoryDrawManager
|
||||
import com.mogo.eagle.core.function.call.och.CallerEagleBaseFunctionCall4OchManager
|
||||
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.scene.SceneConstant.Companion.M_BUS
|
||||
@@ -79,13 +80,14 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
private var autopilotId: String by Delegates.observable("") { _, oldValue, newValue ->
|
||||
if (oldValue != newValue) {
|
||||
CallerEagleBaseFunctionCall4OchManager.setOchAutopilotOrderId(newValue)
|
||||
val (start, end) = getStations()
|
||||
if(start!=null&&end!=null){
|
||||
CallerDataCenterBizListener.invokeOchInfo(OchInfo(0, mutableListOf(start.toMogoLocation(),end.toMogoLocation())))
|
||||
}else{
|
||||
CallerDataCenterBizListener.invokeOchInfo(OchInfo(0, mutableListOf()))
|
||||
if(!AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)&&!AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)){
|
||||
val (start, end) = getStations()
|
||||
if(start!=null&&end!=null){
|
||||
CallerDataCenterBizListener.invokeOchInfo(OchInfo(0, mutableListOf(start.toMogoLocation(),end.toMogoLocation())))
|
||||
}else{
|
||||
CallerDataCenterBizListener.invokeOchInfo(OchInfo(0, mutableListOf()))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,11 @@ import android.content.Context
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.map.SiteMarkerBean
|
||||
import com.mogo.eagle.core.data.och.OchInfo
|
||||
import com.mogo.eagle.core.data.v2x.Point
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.datacenter.CallerDataCenterBizListener
|
||||
import com.mogo.eagle.core.network.utils.digest.DigestUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
@@ -327,6 +331,7 @@ object LineModel {
|
||||
currentTask = null
|
||||
LineManager.setLineInfo(null)
|
||||
LineManager.setStartAndEndStation(null, null)
|
||||
LineModel.callEyeMap(true)
|
||||
stationList = mutableListOf()
|
||||
startStationIndex = 0
|
||||
mBusLinesCallbackMap.forEach {
|
||||
@@ -360,6 +365,7 @@ object LineModel {
|
||||
currentTask = null
|
||||
LineManager.setLineInfo(null)
|
||||
LineManager.setStartAndEndStation(null, null)
|
||||
LineModel.callEyeMap(true)
|
||||
stationList = mutableListOf()
|
||||
startStationIndex = 0
|
||||
mBusLinesCallbackMap.forEach {
|
||||
@@ -404,4 +410,45 @@ object LineModel {
|
||||
}
|
||||
}
|
||||
|
||||
fun callEyeMap(isClear:Boolean){
|
||||
if(isClear) {
|
||||
val ochInfo = OchInfo(1, mutableListOf())
|
||||
ochInfo.siteMarkerList = mutableListOf()
|
||||
CallerDataCenterBizListener.invokeOchInfo(ochInfo)
|
||||
}else{
|
||||
val siteList = mutableListOf<SiteMarkerBean>()
|
||||
var temp: SiteMarkerBean?=null
|
||||
stationList?.let {
|
||||
it.forEachIndexed { index, busStationBean ->
|
||||
if(index==0){
|
||||
temp =SiteMarkerBean(Point(busStationBean.gcjLon,busStationBean.gcjLat),R.drawable.bus_station_start,0.5f,0.87f)
|
||||
}else if(index==it.size-1){
|
||||
temp =SiteMarkerBean(Point(busStationBean.gcjLon,busStationBean.gcjLat),R.drawable.bus_station_end,0.5f,0.87f)
|
||||
}else{
|
||||
if(busStationBean.drivingStatus==1){
|
||||
temp =SiteMarkerBean(Point(busStationBean.gcjLon,busStationBean.gcjLat),R.drawable.bus_station_pass,0.5f,0.478f)
|
||||
}else if (busStationBean.drivingStatus==3){
|
||||
temp =SiteMarkerBean(Point(busStationBean.gcjLon,busStationBean.gcjLat),R.drawable.bus_station_notarrive,0.5f,0.478f)
|
||||
}else if (busStationBean.drivingStatus==2){
|
||||
if(busStationBean.isLeaving){
|
||||
temp =SiteMarkerBean(Point(busStationBean.gcjLon,busStationBean.gcjLat),R.drawable.bus_station_pass,0.5f,0.478f)
|
||||
}else{
|
||||
temp =SiteMarkerBean(Point(busStationBean.gcjLon,busStationBean.gcjLat),R.drawable.bus_station_notarrive,0.5f,0.478f)
|
||||
}
|
||||
}
|
||||
}
|
||||
temp?.let {temp->
|
||||
siteList.add(temp)
|
||||
}
|
||||
}
|
||||
}
|
||||
val (start, end) = LineManager.getStations()
|
||||
if(start!=null&&end!=null){
|
||||
val ochInfo = OchInfo(1, mutableListOf(start.toMogoLocation(),end.toMogoLocation()))
|
||||
ochInfo.siteMarkerList = siteList
|
||||
CallerDataCenterBizListener.invokeOchInfo(ochInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -416,6 +416,7 @@ object OrderModel {
|
||||
if(LineModel.startStationIndex +1< it.size){
|
||||
val endStation = it[LineModel.startStationIndex +1]
|
||||
LineManager.setStartAndEndStation(startStation,endStation)
|
||||
LineModel.callEyeMap(false)
|
||||
}
|
||||
}
|
||||
LineModel.arrivedStationSuccess()
|
||||
@@ -431,6 +432,7 @@ object OrderModel {
|
||||
if(LineModel.startStationIndex +1< it.size){
|
||||
val endStation = it[LineModel.startStationIndex +1]
|
||||
LineManager.setStartAndEndStation(startStation,endStation)
|
||||
LineModel.callEyeMap(false)
|
||||
}
|
||||
}
|
||||
LineModel.arrivedStationSuccess()
|
||||
|
||||
@@ -124,6 +124,7 @@ class NormalRepository: ILineRepository {
|
||||
if (LineModel.startStationIndex < stationlist.size-1) {
|
||||
val endStation = stationlist[LineModel.startStationIndex + 1]
|
||||
LineManager.setStartAndEndStation(startStation,endStation)
|
||||
LineModel.callEyeMap(false)
|
||||
}
|
||||
}
|
||||
return@flatMap Observable.just(true)
|
||||
|
||||
@@ -100,6 +100,7 @@ class WeaknetRepository : ILineRepository {
|
||||
if (LineModel.startStationIndex < stationlist.size-1) {
|
||||
val endStation = stationlist[LineModel.startStationIndex + 1]
|
||||
LineManager.setStartAndEndStation(startStation,endStation)
|
||||
LineModel.callEyeMap(false)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Reference in New Issue
Block a user