Merge branch 'dev_robosweeper-d_app-module_221230_1.1.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_robosweeper-d_app-module_221230_1.1.0
This commit is contained in:
@@ -36,6 +36,8 @@ class WeltMapOverView : ConstraintLayout, IMoGoChassisLocationGCJ02Listener {
|
||||
private var mRoutePolylines: Polyline?=null
|
||||
// private val mLineMarkers: MutableList<Marker?> = mutableListOf()
|
||||
private var mEndStationMarker: Marker? = null
|
||||
private var mogoDistanceLocationMax: LatLng?=null
|
||||
private var aPointDistanceMax = 0.0F
|
||||
private var mFirst: Boolean = false
|
||||
|
||||
//清扫车任务地图
|
||||
@@ -129,11 +131,11 @@ class WeltMapOverView : ConstraintLayout, IMoGoChassisLocationGCJ02Listener {
|
||||
colorList.add(ContextCompat.getColor(context,R.color.sweeper_236299))
|
||||
} else if (weltDataBean.weltDistance < 0) {
|
||||
colorList.add(ContextCompat.getColor(context,R.color.sweeper_c22101))
|
||||
} else if (weltDataBean.weltDistance >= 0 && weltDataBean.weltDistance < 0.01) {
|
||||
} else if (weltDataBean.weltDistance >= 0 && weltDataBean.weltDistance < 0.1) {
|
||||
colorList.add(ContextCompat.getColor(context,R.color.sweeper_4dffa4))
|
||||
} else if (weltDataBean.weltDistance >= 0.010 && weltDataBean.weltDistance < 0.020) {
|
||||
} else if (weltDataBean.weltDistance >= 0.1 && weltDataBean.weltDistance < 0.2) {
|
||||
colorList.add(ContextCompat.getColor(context,R.color.sweeper_ffdd4d))
|
||||
} else if (weltDataBean.weltDistance >= 0.020) {
|
||||
} else if (weltDataBean.weltDistance >= 0.2) {
|
||||
colorList.add(ContextCompat.getColor(context,R.color.sweeper_ff912b))
|
||||
}
|
||||
}
|
||||
@@ -153,9 +155,27 @@ class WeltMapOverView : ConstraintLayout, IMoGoChassisLocationGCJ02Listener {
|
||||
if (mTaskCoordinatesLatLng.size > 0) {
|
||||
//存放经纬度
|
||||
for (i in mTaskCoordinatesLatLng.indices) {
|
||||
boundsBuilder.include(mTaskCoordinatesLatLng[i])
|
||||
val latLng = mTaskCoordinatesLatLng[i]
|
||||
boundsBuilder.include(latLng)
|
||||
try {
|
||||
val calculateLineDistance = CoordinateUtils.calculateLineDistance(
|
||||
latLng.longitude,
|
||||
latLng.latitude,
|
||||
currentLatLng.latitude,
|
||||
currentLatLng.longitude
|
||||
)
|
||||
if(calculateLineDistance>aPointDistanceMax){
|
||||
aPointDistanceMax = calculateLineDistance
|
||||
mogoDistanceLocationMax = currentLatLng
|
||||
}
|
||||
}catch (e:Exception){
|
||||
CallerLogger.e(TAG,e.stackTrace)
|
||||
}
|
||||
}
|
||||
}
|
||||
mogoDistanceLocationMax?.let {
|
||||
boundsBuilder.include(it)
|
||||
}
|
||||
boundsBuilder.include(currentLatLng)
|
||||
mAMap?.moveCamera(CameraUpdateFactory.newLatLngBoundsRect(boundsBuilder.build(), 100, 100, 100, 100))
|
||||
|
||||
|
||||
@@ -185,11 +185,11 @@ class WeltSmallMapView : ConstraintLayout, IMoGoChassisLocationGCJ02Listener {
|
||||
colorList.add(ContextCompat.getColor(context,R.color.sweeper_236299))
|
||||
} else if (weltDataBean.weltDistance < 0) {
|
||||
colorList.add(ContextCompat.getColor(context,R.color.sweeper_c22101))
|
||||
} else if (weltDataBean.weltDistance >= 0 && weltDataBean.weltDistance < 0.010) {
|
||||
} else if (weltDataBean.weltDistance >= 0 && weltDataBean.weltDistance < 0.1) {
|
||||
colorList.add(ContextCompat.getColor(context,R.color.sweeper_4dffa4))
|
||||
} else if (weltDataBean.weltDistance >= 0.010 && weltDataBean.weltDistance < 0.020) {
|
||||
} else if (weltDataBean.weltDistance >= 0.1 && weltDataBean.weltDistance < 0.2) {
|
||||
colorList.add(ContextCompat.getColor(context,R.color.sweeper_ffdd4d))
|
||||
} else if (weltDataBean.weltDistance >= 0.020) {
|
||||
} else if (weltDataBean.weltDistance >= 0.2) {
|
||||
colorList.add(ContextCompat.getColor(context,R.color.sweeper_ff912b))
|
||||
}
|
||||
}
|
||||
@@ -291,7 +291,9 @@ class WeltSmallMapView : ConstraintLayout, IMoGoChassisLocationGCJ02Listener {
|
||||
for (i in routeList.indices) {
|
||||
routeCoordinatesLatLngs.add(LatLng(routeList[i].latitude, routeList[i].longitude))
|
||||
}
|
||||
drawRouteListPolyline(routeCoordinatesLatLngs)
|
||||
ThreadUtils.runOnUiThread {
|
||||
drawRouteListPolyline(routeCoordinatesLatLngs)
|
||||
}
|
||||
}
|
||||
|
||||
private fun drawRouteListPolyline(routeList: MutableList<LatLng>) {
|
||||
|
||||
@@ -367,19 +367,19 @@ public class TaxiPassengerServingOrderFragment extends
|
||||
private void updateSpeedView(float newSpeed) {
|
||||
int speed = (int) (Math.abs(newSpeed) * 3.6F); // 倒车时工控机反馈定位信息中speed为负值
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG,"mLimitingVelocity = "+mLimitingVelocity);
|
||||
if (mLimitingVelocity > 0 && speed >= mLimitingVelocity) {
|
||||
mTPSpeedTv.setmColorList(new int[]{getResources().getColor(R.color.taxi_p_speed_warn_color1),getResources().getColor(R.color.taxi_p_speed_warn_color2)});
|
||||
mTPSpeedTv.setText(String.valueOf(speed));
|
||||
mTPSpeedTvShadowBg.setText(String.valueOf(speed));
|
||||
|
||||
mSpeedLayoutBg.setImageResource(R.drawable.taxi_p_speed_light_red_bg);
|
||||
} else {
|
||||
// if (mLimitingVelocity > 0 && speed >= mLimitingVelocity) {
|
||||
// mTPSpeedTv.setmColorList(new int[]{getResources().getColor(R.color.taxi_p_speed_warn_color1),getResources().getColor(R.color.taxi_p_speed_warn_color2)});
|
||||
// mTPSpeedTv.setText(String.valueOf(speed));
|
||||
// mTPSpeedTvShadowBg.setText(String.valueOf(speed));
|
||||
//
|
||||
// mSpeedLayoutBg.setImageResource(R.drawable.taxi_p_speed_light_red_bg);
|
||||
// } else {
|
||||
mTPSpeedTv.setmColorList(new int[]{getResources().getColor(R.color.taxi_p_speed_normal_color1),getResources().getColor(R.color.taxi_p_speed_normal_color2)});
|
||||
mTPSpeedTv.setText(String.valueOf(speed));
|
||||
mTPSpeedTvShadowBg.setText(String.valueOf(speed));
|
||||
|
||||
mSpeedLayoutBg.setImageResource(R.drawable.taxi_p_speed_light_green_bg);
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
private void runOnUIThread(Runnable executor) {
|
||||
|
||||
Reference in New Issue
Block a user