[driver passenger ] bus乘客屏 1、UI走查 2、隐藏摄像头 3、小地图显示逻辑更改

This commit is contained in:
wangmingjun
2022-04-14 14:51:24 +08:00
parent 1d8ba2834d
commit af14f38a73
34 changed files with 596 additions and 510 deletions

View File

@@ -7,6 +7,7 @@ import androidx.fragment.app.FragmentActivity;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.elegant.utils.UiThreadHandler;
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.map.MogoMapUIController;
import com.mogo.module.common.MogoApisHandler;
@@ -44,7 +45,7 @@ public class MogoOCHBusPassenger implements IMogoOCH, IMogoStatusChangedListener
this.mActivity = activity;
this.mContainerId = containerId;
UiThreadHandler.post(() -> stepIntoVrMode());
// UiThreadHandler.post(() -> stepIntoVrMode());
return null;
}
@@ -85,6 +86,8 @@ public class MogoOCHBusPassenger implements IMogoOCH, IMogoStatusChangedListener
CallerLogger.INSTANCE.d( M_TAXI_P + TAG, "进入vr模式" );
MogoMapUIController.getInstance()
.stepInVrMode( true ); // 白天模式
CallerMoGoUiSettingManager.INSTANCE.stepInDayMode();//白天模式 状态栏字体颜色变黑
}
private void showFragment() {

View File

@@ -329,6 +329,9 @@ public class BusPassengerModel {
if (DebugConfig.isDebug()) {
// TipToast.shortTip("到达目的地");
}
if (mADASStatusCallback != null){
mADASStatusCallback.onAutopilotArriveEnd();
}
}
};

View File

@@ -115,7 +115,7 @@ public abstract class BusPassengerBaseFragment<V extends IView, P extends Presen
}
}
String strHtml2 = "<font color=\"#2D3E5F\">距离 </font>" + "<b><font color=\"#0043FF\">" + dis + "</font></b>" + "<font color=\"#2D3E5F\"> "+disUnit+"</font>"
+ "<font color=\"#2D3E5F\">"+" "+"剩余 </font>" + "<b><font color=\"#0043FF\">" + (int)Math.ceil((double)timeInSecond/ 60f) + "</font></b>" + "<font color=\"#2D3E5F\"> 分钟</font>";
+ "<font color=\"#2D3E5F\"> &nbsp 剩余 </font>" + "<b><font color=\"#0043FF\">" + (int)Math.ceil((double)timeInSecond/ 60f) + "</font></b>" + "<font color=\"#2D3E5F\"> 分钟</font>";
mCurrentArriveTip.setText(Html.fromHtml(strHtml2));
}

View File

@@ -56,14 +56,17 @@ public class BusPassengerMapDirectionView
private Marker mStartMarker;
private Marker mEndMarker;
private int mCurrentIndex = -1;
private int zoomLevel = 13;
private List<LatLng> mCoordinatesLatLng = new ArrayList<>();
private List<LatLng> mWayPointsLatLng = new ArrayList<>();
private List<LatLng> mLinePointsLatLng = new ArrayList<>();
private Polyline mPolyline;
private CameraUpdate mCameraUpdate;
private Context mContext;
private List<Integer> colorList = new ArrayList<>();
private List<Marker> mLineMarkers = new ArrayList<>();
private IBusPassengerMapViewCallback mIBusPassengerMapViewCallback;
@@ -84,7 +87,7 @@ public class BusPassengerMapDirectionView
}
}
public void setTaxiPassengerMapViewCallback(IBusPassengerMapViewCallback iBusPassengerMapViewCallback){
public void setTaxiPassengerMapViewCallback(IBusPassengerMapViewCallback iBusPassengerMapViewCallback) {
this.mIBusPassengerMapViewCallback = iBusPassengerMapViewCallback;
}
@@ -111,7 +114,7 @@ public class BusPassengerMapDirectionView
}
private void initAMapView() {
mCameraUpdate = CameraUpdateFactory.zoomTo(zoomLevel);
// mCameraUpdate = CameraUpdateFactory.zoomTo(zoomLevel);
mAMap = mAMapNaviView.getMap();
// 设置导航地图模式aMap是地图控制器对象。
mAMap.setMapType(AMap.MAP_TYPE_NIGHT);
@@ -124,20 +127,20 @@ public class BusPassengerMapDirectionView
.icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_car))
.anchor(0.5f, 0.5f));
mStartMarker = mAMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_start)));
.icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_way_point)));
mEndMarker = mAMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_end)));
.icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_end_point)));
// 加载自定义样式
CustomMapStyleOptions customMapStyleOptions = new CustomMapStyleOptions()
.setEnable(true)
.setStyleData(BusPassengerMapAssetStyleUtil.getAssetsStyle(getContext(),"map_style.data"))
.setStyleExtraData(BusPassengerMapAssetStyleUtil.getAssetsExtraStyle(getContext(),"map_style_extra.data"));
.setStyleData(BusPassengerMapAssetStyleUtil.getAssetsStyle(getContext(), "map_style.data"))
.setStyleExtraData(BusPassengerMapAssetStyleUtil.getAssetsExtraStyle(getContext(), "map_style_extra.data"));
// 设置自定义样式
mAMap.setCustomMapStyle(customMapStyleOptions);
//设置希望展示的地图缩放级别
mAMap.moveCamera(mCameraUpdate);
// mAMap.moveCamera(mCameraUpdate);
// 设置地图的样式
UiSettings uiSettings = mAMap.getUiSettings();
@@ -153,8 +156,8 @@ public class BusPassengerMapDirectionView
// 加载自定义样式
CustomMapStyleOptions customMapStyleOptions = new CustomMapStyleOptions()
.setEnable(true)
.setStyleData(BusPassengerMapAssetStyleUtil.getAssetsStyle(getContext(),"map_style.data"))
.setStyleExtraData(BusPassengerMapAssetStyleUtil.getAssetsExtraStyle(getContext(),"map_style_extra.data"));
.setStyleData(BusPassengerMapAssetStyleUtil.getAssetsStyle(getContext(), "map_style.data"))
.setStyleExtraData(BusPassengerMapAssetStyleUtil.getAssetsExtraStyle(getContext(), "map_style_extra.data"));
// 设置自定义样式
mAMap.setCustomMapStyle(customMapStyleOptions);
mAMapNaviView.getMap().setPointToCenter(mAMapNaviView.getWidth() / 2, mAMapNaviView.getHeight() / 2);
@@ -174,8 +177,8 @@ public class BusPassengerMapDirectionView
@Override
public void onLocationChanged(@Nullable MogoLocation location) {
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "onCarLocationChanged2 :" + location.getLatitude()+":"+location.getLongitude());
if (location == null){
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "onCarLocationChanged2 :" + location.getLatitude() + ":" + location.getLongitude());
if (location == null) {
return;
}
LatLng currentLatLng = new LatLng(location.getLatitude(), location.getLongitude());
@@ -188,21 +191,17 @@ public class BusPassengerMapDirectionView
mCarMarker.setToTop();
}
if (mCoordinatesLatLng.size() > 1) {
if (mLinePointsLatLng.size() > 1){
//圈定地图显示范围
LatLng endLatLng = mCoordinatesLatLng.get(mCoordinatesLatLng.size() - 1);
LatLng startLatLng = mCoordinatesLatLng.get(0);
//存放经纬度
LatLngBounds.Builder boundsBuilder = new LatLngBounds.Builder();
boundsBuilder.include(startLatLng);
boundsBuilder.include(endLatLng);
for (int i=0;i < mWayPointsLatLng.size();i++){
boundsBuilder.include(mWayPointsLatLng.get(i));
for (int i = 0; i < mLinePointsLatLng.size(); i++) {
boundsBuilder.include(mLinePointsLatLng.get(i));
}
//第二个参数为四周留空宽度
mAMap.animateCamera(CameraUpdateFactory.newLatLngBounds(boundsBuilder.build(), 100));
mAMap.animateCamera(CameraUpdateFactory.newLatLngBoundsRect(boundsBuilder.build(),100,100,100,100));
} else {
}else {
//设置希望展示的地图缩放级别
CameraPosition cameraPosition = new CameraPosition.Builder()
.target(mCarMarker.getPosition()).tilt(0).bearing(location.getBearing()).zoom(zoomLevel).build();
@@ -240,15 +239,6 @@ public class BusPassengerMapDirectionView
mPolyline = mAMap.addPolyline(polylineOptions);
}
if (mWayPointsLatLng.size() > 0){
for (int i =0 ;i< mWayPointsLatLng.size(); i++){
Marker mWayPointMarker = mAMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_way_point)));
mWayPointMarker.setPosition(mWayPointsLatLng.get(i));
mWayPointMarker.setVisible(true);
}
}
}
}
@@ -256,29 +246,11 @@ public class BusPassengerMapDirectionView
* 添加画线颜色值
*/
private void addRouteColorList() {
for (int i = 0; i < mCoordinatesLatLng.size(); i++){
for (int i = 0; i < mCoordinatesLatLng.size(); i++) {
colorList.add(Color.argb(255, 70, 147, 253));//路线颜色
}
}
public LatLng CoordinateConverterFrom84(Context mContext, MogoLatLng mogoLatLng) {
CoordinateConverter mCoordinateConverter = new CoordinateConverter(mContext);
mCoordinateConverter.from(CoordinateConverter.CoordType.GPS);
mCoordinateConverter.coord(new LatLng(mogoLatLng.lat, mogoLatLng.lon));
LatLng latLng = mCoordinateConverter.convert();
return latLng;
}
public List<LatLng> CoordinateConverterFrom84ForList(Context mContext, List<MogoLatLng> mogoLatLngList) {
List<LatLng> list = new ArrayList<>();
for (MogoLatLng m : mogoLatLngList) {
LatLng mogoLatLng = CoordinateConverterFrom84(mContext, m);
list.add(mogoLatLng);
}
return list;
}
@Override
public void clearPolyline() {
if (mPolyline != null) {
@@ -292,19 +264,6 @@ public class BusPassengerMapDirectionView
}
}
public void resetPolyine() {
mCoordinatesLatLng.clear();
if (mPolyline != null) {
mPolyline.remove();
}
if (mStartMarker != null) {
mStartMarker.setVisible(false);
}
if (mEndMarker != null) {
mEndMarker.setVisible(false);
}
}
public void onCreateView(Bundle savedInstanceState) {
if (mAMapNaviView != null) {
mAMapNaviView.onCreate(savedInstanceState);
@@ -321,28 +280,53 @@ public class BusPassengerMapDirectionView
if (mAMapNaviView != null) {
mAMapNaviView.onPause();
}
mCurrentIndex = -1;
}
public void onDestroy() {
if (mAMapNaviView != null) {
mAMapNaviView.onDestroy();
}
mCurrentIndex = -1;
}
public void convert(List<MogoLatLng> coordinates) {
mCoordinatesLatLng.clear();
List<LatLng> latLngs = CoordinateConverterFrom84ForList(mContext, coordinates);
mCoordinatesLatLng.addAll(latLngs);
}
public void setCoordinatesLatLng(List<LatLng> latLngs){
public void setCoordinatesLatLng(List<LatLng> latLngs) {
mCoordinatesLatLng.clear();
mCoordinatesLatLng.addAll(latLngs);
}
public void setWayPointMarker(List<LatLng> wayPointLatLngs){
mWayPointsLatLng.clear();
mCoordinatesLatLng.addAll(wayPointLatLngs);
public void setLinePointMarkerAndDraw(List<LatLng> routeLineLatLngs, int currentIndex) {
mLinePointsLatLng.clear();
mLineMarkers.clear();
mLinePointsLatLng.addAll(routeLineLatLngs);
for (int i = 0; i < mLinePointsLatLng.size(); i++) {
Marker mWayPointMarker = mAMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_way_point)));
mLineMarkers.add(mWayPointMarker);
}
if (mCoordinatesLatLng.size() == 0) {
for (int i = 0; i < mLineMarkers.size(); i++) {
mLineMarkers.get(i).setPosition(mLinePointsLatLng.get(i));
mLineMarkers.get(i).setVisible(true);
}
mCurrentIndex = -1;
return;
}
if (mCurrentIndex != currentIndex) {
if (mAMap != null && mLineMarkers.size() > 0) {
mCurrentIndex = currentIndex;
for (int i = 0; i < mLineMarkers.size(); i++) {
if (i != currentIndex && i + 1 != currentIndex) {
mLineMarkers.get(i).setPosition(mLinePointsLatLng.get(i));
mLineMarkers.get(i).setVisible(true);
} else {
mLineMarkers.get(i).setVisible(false);
}
}
}
}
}
@Override

View File

@@ -22,19 +22,13 @@ import com.mogo.och.bus.passenger.R;
import com.mogo.och.bus.passenger.adapter.BusPassengerLineStationsAdapter;
import com.mogo.och.bus.passenger.bean.BusPassengerStation;
import com.mogo.och.bus.passenger.callback.IBusPassengerMapViewCallback;
import com.mogo.och.bus.passenger.model.BusPassengerModel;
import com.mogo.och.bus.passenger.presenter.BaseBusPassengerPresenter;
import org.jetbrains.annotations.NotNull;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.mogo.och.bus.passenger.utils.BPCoordinateCalculateRouteUtil;
import com.mogo.och.bus.passenger.utils.BPRouteDataTestUtils;
import java.util.ArrayList;
import java.util.List;
import mogo.telematics.pad.MessagePad;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P;
/**
@@ -48,7 +42,7 @@ public class BusPassengerRouteFragment extends
private BusPassengerTrafficLightView mTrafficLightView;
private List<BusPassengerStation> mStationsList = new ArrayList<>();
private List<LatLng> mWayPointsList = new ArrayList<>();
private List<LatLng> mRoutePointsList = new ArrayList<>();
private TextView mSpeedTv;
private ConstraintLayout mNoLineInfoView;
@@ -100,196 +94,13 @@ public class BusPassengerRouteFragment extends
mSpeedTv.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
String listStr = "{\"models\":[{\n" +
"\t\t\"lat\": 40.19927810144466,\n" +
"\t\t\"lon\": 116.73527259387767\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19927836356079,\n" +
"\t\t\"lon\": 116.73513114732762\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19927759500293,\n" +
"\t\t\"lon\": 116.73497660879111\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.199264819842284,\n" +
"\t\t\"lon\": 116.73480063747202\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1992510141554,\n" +
"\t\t\"lon\": 116.73463922037767\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.199245872804,\n" +
"\t\t\"lon\": 116.73445960685193\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19924673374912,\n" +
"\t\t\"lon\": 116.73427704009703\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19924747108264,\n" +
"\t\t\"lon\": 116.7340707102972\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19924828745573,\n" +
"\t\t\"lon\": 116.73385916927226\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19924941093133,\n" +
"\t\t\"lon\": 116.73364048294795\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19924939253381,\n" +
"\t\t\"lon\": 116.73340837408566\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19924949105934,\n" +
"\t\t\"lon\": 116.73317368725336\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19925040039033,\n" +
"\t\t\"lon\": 116.73296532811216\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1992515355653,\n" +
"\t\t\"lon\": 116.73277787366743\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1992512720328,\n" +
"\t\t\"lon\": 116.73263377253741\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.199205174954606,\n" +
"\t\t\"lon\": 116.73249773114644\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1991015743076,\n" +
"\t\t\"lon\": 116.7324219601283\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.198971862686285,\n" +
"\t\t\"lon\": 116.73239393296355\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19883883071582,\n" +
"\t\t\"lon\": 116.73237676435652\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19870171355796,\n" +
"\t\t\"lon\": 116.73236052150362\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1985491853193,\n" +
"\t\t\"lon\": 116.73234157857011\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1983890047355,\n" +
"\t\t\"lon\": 116.73232167996464\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1982209877466,\n" +
"\t\t\"lon\": 116.73230101645792\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.198037574138326,\n" +
"\t\t\"lon\": 116.73227735486083\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19787327856243,\n" +
"\t\t\"lon\": 116.73225676816314\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19771917207499,\n" +
"\t\t\"lon\": 116.73223814728027\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.197548305175935,\n" +
"\t\t\"lon\": 116.73221624705808\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19739568979691,\n" +
"\t\t\"lon\": 116.73219618210774\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19724703821575,\n" +
"\t\t\"lon\": 116.73217598293311\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1970956560885,\n" +
"\t\t\"lon\": 116.73215773721505\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19697703483188,\n" +
"\t\t\"lon\": 116.73214337172284\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19687000725696,\n" +
"\t\t\"lon\": 116.73210037067965\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.196833449601726,\n" +
"\t\t\"lon\": 116.73196646708011\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19685833847804,\n" +
"\t\t\"lon\": 116.73181315361103\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.196889170203264,\n" +
"\t\t\"lon\": 116.73164355747393\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19692242860347,\n" +
"\t\t\"lon\": 116.7314555399657\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19696431701069,\n" +
"\t\t\"lon\": 116.7312261834129\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19700025925464,\n" +
"\t\t\"lon\": 116.73102774016093\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19703414798773,\n" +
"\t\t\"lon\": 116.73084270562073\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19707287604138,\n" +
"\t\t\"lon\": 116.73062835248406\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19710951629977,\n" +
"\t\t\"lon\": 116.73041744082339\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19714593807105,\n" +
"\t\t\"lon\": 116.73021414314803\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.197183297026285,\n" +
"\t\t\"lon\": 116.7300057066447\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1972247359487,\n" +
"\t\t\"lon\": 116.7297751515664\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19726518822745,\n" +
"\t\t\"lon\": 116.72954958923812\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19730538240706,\n" +
"\t\t\"lon\": 116.72932440756041\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19734272112662,\n" +
"\t\t\"lon\": 116.72911631453036\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.197379191549075,\n" +
"\t\t\"lon\": 116.72890982812105\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.197417565369314,\n" +
"\t\t\"lon\": 116.72869447869044\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19746052080799,\n" +
"\t\t\"lon\": 116.72845641541247\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19750040582118,\n" +
"\t\t\"lon\": 116.72823569991117\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19753999704064,\n" +
"\t\t\"lon\": 116.72801998373052\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19757796882569,\n" +
"\t\t\"lon\": 116.72781280504363\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.197617062364586,\n" +
"\t\t\"lon\": 116.72759949431683\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19765391602761,\n" +
"\t\t\"lon\": 116.72739776789756\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19768973009218,\n" +
"\t\t\"lon\": 116.72719980764646\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.197726191028785,\n" +
"\t\t\"lon\": 116.72699719861669\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19776233489642,\n" +
"\t\t\"lon\": 116.72679516155276\n" +
"\t}]}\n";
List<MessagePad.Location> list = new ArrayList<>();
try {
JSONObject jsonObject = new JSONObject(listStr);
JSONArray jsonElements = jsonObject.getJSONArray("models");
for (int i = 0; i < jsonElements.length(); i++){
JSONObject s = jsonElements.getJSONObject(i);
MessagePad.Location.Builder routeModels = MessagePad.Location.newBuilder();
routeModels.setLatitude(s.getDouble("lat"));
routeModels.setLongitude(s.getDouble("lon"));
list.add(routeModels.build());
BPRouteDataTestUtils.converToRouteData();
UiThreadHandler.postDelayed(new Runnable() {
@Override
public void run() {
updateWayPointList(mStationsList,1);
}
BusPassengerModel.getInstance().updateRoutePoints(list);
} catch (JSONException e) {
e.printStackTrace();
}
},1000);
return false;
}
});
@@ -343,7 +154,6 @@ public class BusPassengerRouteFragment extends
*/
private void drawablePolyline(List<LatLng> coordinates) {
if (mMapDirectionView != null) {
mMapDirectionView.setWayPointMarker(mWayPointsList);
mMapDirectionView.setCoordinatesLatLng(coordinates);
UiThreadHandler.post(new Runnable() {
@Override
@@ -354,12 +164,13 @@ public class BusPassengerRouteFragment extends
}
}
private void clearPolyline() {
public void clearPolyline() {
if (mMapDirectionView != null) {
UiThreadHandler.post(new Runnable() {
@Override
public void run() {
mMapDirectionView.clearPolyline();
}
});
}
@@ -385,22 +196,30 @@ public class BusPassengerRouteFragment extends
}
}
/**
*
* @param stations
* @param currentStationIndex
* @param isArrived 是否到站并离开true 到达当前站 currentStationIndex 未离开, false 正在前往此站 currentStationIndex
*/
public void updateStationsInfo(List<BusPassengerStation> stations, int currentStationIndex,boolean isArrived) {
updateArrivedStation(stations.get(currentStationIndex).getName(),currentStationIndex,isArrived);
mStationsList.clear();
mStationsList.addAll(stations);
mAdapter.notifyDataSetChanged();
if (stations.size() > 2){
updateWayPointList(stations);
if (stations.size() > 0){
updateWayPointList(stations,currentStationIndex);
}
}
private void updateWayPointList(List<BusPassengerStation> stations) {
mWayPointsList.clear();
for (int i = 1; i< stations.size() -1; i++) {//去除路线的起点和终点, 只要中间途径站点
LatLng latLng = new LatLng(stations.get(i).getLat(),stations.get(i).getLon());// lat,lon
mWayPointsList.add(latLng);
private void updateWayPointList(List<BusPassengerStation> stations,int currentStationIndex) {
mRoutePointsList.clear();
for (int i = 0; i< stations.size(); i++) {//站点集合
LatLng latLng = BPCoordinateCalculateRouteUtil.coordinateConverterWgsToGcj(getContext()
,stations.get(i).getLon(),stations.get(i).getLat());// lat,lon
mRoutePointsList.add(latLng);
}
mMapDirectionView.setLinePointMarkerAndDraw(mRoutePointsList,currentStationIndex);
}
@Override

View File

@@ -97,9 +97,6 @@ public class BusPassengerTrafficLightView extends IViewTrafficLight {
super.changeCountdownRed(redNum);
UiThreadHandler.post(() -> {
if (redNum > 0) {
// mLightTimeTV.setVertrial(true);
// mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.bus_p_traffic_light_red_color_up),
// getResources().getColor(R.color.bus_p_traffic_light_red_color_down)});
mLightTimeTV.setText(String.valueOf(redNum));
} else {
mLightTimeTV.setText("");
@@ -112,9 +109,6 @@ public class BusPassengerTrafficLightView extends IViewTrafficLight {
super.changeCountdownGreen(greenNum);
UiThreadHandler.post(() -> {
if (greenNum > 0) {
// mLightTimeTV.setVertrial(true);
// mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.bus_p_traffic_light_green_color_up),
// getResources().getColor(R.color.bus_p_traffic_light_green_color_down)});
mLightTimeTV.setText(String.valueOf(greenNum));
} else {
mLightTimeTV.setText("");
@@ -127,9 +121,6 @@ public class BusPassengerTrafficLightView extends IViewTrafficLight {
super.changeCountdownYellow(yellowNum);
UiThreadHandler.post(() -> {
if (yellowNum > 0) {
// mLightTimeTV.setVertrial(true);
// mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.bus_p_traffic_light_yellow_color_up),
// getResources().getColor(R.color.bus_p_traffic_light_yellow_color_down)});
mLightTimeTV.setText(String.valueOf(yellowNum));
} else {
mLightTimeTV.setText("");

View File

@@ -48,6 +48,14 @@ public class BPCoordinateCalculateRouteUtil {
return list;
}
public static LatLng coordinateConverterWgsToGcj(Context mContext, double lon, double lat) {
CoordinateConverter mCoordinateConverter = new CoordinateConverter(mContext);
mCoordinateConverter.from(CoordinateConverter.CoordType.GPS);
mCoordinateConverter.coord(new LatLng(lat,lon));
LatLng latLng = mCoordinateConverter.convert();
return latLng;
}
public static LatLng coordinateConverterWgsToGcj(Context mContext, MessagePad.Location mogoLatLng) {
CoordinateConverter mCoordinateConverter = new CoordinateConverter(mContext);
mCoordinateConverter.from(CoordinateConverter.CoordType.GPS);

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 628 B

View File

@@ -4,8 +4,8 @@
<shape android:shape="rectangle">
<gradient
android:angle="90"
android:endColor="#E1E7F5"
android:startColor="#E1E7F5"
android:endColor="#F2F7FF"
android:startColor="#E6ECF9"
android:type="linear" />
</shape>
</item>

View File

@@ -71,7 +71,6 @@
android:id="@+id/dividing_line_1"
android:layout_width="match_parent"
android:layout_height="@dimen/bus_p_route_line_dividing_view_height"
android:layout_marginTop="@dimen/dp_30"
android:background="@drawable/bus_p_dividing_line_bg"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/bus_p_speed_tv" />

View File

@@ -50,11 +50,13 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="@dimen/bus_p_station_tag_width_height"
android:layout_height="@dimen/bus_p_station_tag_width_height"
android:textSize="@dimen/bus_p_station_tag_txt_size"
android:textColor="@color/bus_p_end_tag_txt_color"
android:text="@string/bus_p_end_station_txt_tag"
android:includeFontPadding="false"
android:gravity="center"
app:layout_constraintLeft_toLeftOf="@+id/bus_p_end_tag"
app:layout_constraintRight_toRightOf="@+id/bus_p_end_tag"
app:layout_constraintTop_toTopOf="@+id/bus_p_end_tag"

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/bus_p_station_item_height"
android:layout_height="@dimen/bus_p_station_item_middle_height"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView

View File

@@ -52,11 +52,13 @@
app:layout_constraintTop_toTopOf="@+id/bus_p_start_station"
app:layout_constraintBottom_toBottomOf="@+id/bus_p_start_station"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="@dimen/bus_p_station_tag_width_height"
android:layout_height="@dimen/bus_p_station_tag_width_height"
android:textSize="@dimen/bus_p_station_tag_txt_size"
android:textColor="@color/bus_p_end_tag_txt_color"
android:text="@string/bus_p_start_station_txt_tag"
android:includeFontPadding="false"
android:gravity="center"
app:layout_constraintLeft_toLeftOf="@+id/bus_p_start_tag"
app:layout_constraintRight_toRightOf="@+id/bus_p_start_tag"
app:layout_constraintTop_toTopOf="@+id/bus_p_start_tag"

View File

@@ -17,6 +17,7 @@
android:id="@+id/bus_p_traffic_light_iv"
android:layout_width="@dimen/bus_p_traffic_light_icon_size"
android:layout_height="@dimen/bus_p_traffic_light_icon_size"
android:layout_marginTop="@dimen/dp_8"
android:scaleType="fitXY"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
@@ -27,6 +28,7 @@
android:layout_height="match_parent"
android:textSize="@dimen/bus_p_traffic_light_time_size"
android:textStyle="bold"
android:textColor="@color/bus_p_traffic_txt_color"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center" />

View File

@@ -4,10 +4,10 @@
<dimen name="bus_p_route_info_margin_right">40px</dimen>
<dimen name="bus_p_route_info_margin_left">40px</dimen>
<dimen name="bus_p_route_info_margin_bottom">40px</dimen>
<dimen name="bus_p_route_info_margin_top">70px</dimen>
<dimen name="bus_p_route_info_margin_top">110px</dimen>
<dimen name="bus_p_route_line_info_height">224px</dimen>
<dimen name="bus_p_route_line_map_view_height">510px</dimen>
<dimen name="bus_p_route_line_dividing_view_height">1px</dimen>
<dimen name="bus_p_route_line_dividing_view_height">3px</dimen>
<dimen name="bus_p_route_traffic_light_view_width">158px</dimen>
<dimen name="bus_p_route_traffic_light_view_height">90px</dimen>
@@ -15,8 +15,8 @@
<dimen name="bus_p_traffic_light_bg_width">158px</dimen>
<dimen name="bus_p_traffic_light_bg_height">90px</dimen>
<dimen name="bus_p_traffic_light_time_size">45px</dimen>
<dimen name="bus_p_traffic_light_time_view_width">100px</dimen>
<dimen name="bus_p_traffic_light_icon_size">100px</dimen>
<dimen name="bus_p_traffic_light_time_view_width">90px</dimen>
<dimen name="bus_p_traffic_light_icon_size">90px</dimen>
<dimen name="bus_p_traffic_light_bg_stroke_width">3px</dimen>
<dimen name="bus_p_route_dividing_line2_margin_top">224px</dimen>
@@ -41,7 +41,8 @@
<dimen name="bus_p_mid_station_circle_cor">6px</dimen>
<dimen name="bus_p_station_txt_size">50px</dimen>
<dimen name="bus_p_station_tag_txt_size">36px</dimen>
<dimen name="bus_p_station_item_height">75px</dimen>
<dimen name="bus_p_station_item_height">80px</dimen>
<dimen name="bus_p_station_item_middle_height">100px</dimen>
<dimen name="bus_p_station_tag_line_height">50px</dimen>
<dimen name="bus_p_station_tag_line_width">6px</dimen>

View File

@@ -25,4 +25,5 @@
<color name="bus_p_panel_cur_station_tips_color">#2D3E5F</color>
<color name="bus_p_panel_cur_station_panel_color">#E6E9EFFC</color>
<color name="bus_p_route_view_left_edge_shadow">#33394C63</color>
<color name="bus_p_traffic_txt_color">#2D3E5F</color>
</resources>

View File

@@ -5,10 +5,10 @@
<dimen name="bus_p_route_info_margin_right">40px</dimen>
<dimen name="bus_p_route_info_margin_left">40px</dimen>
<dimen name="bus_p_route_info_margin_bottom">40px</dimen>
<dimen name="bus_p_route_info_margin_top">70px</dimen>
<dimen name="bus_p_route_info_margin_top">110px</dimen>
<dimen name="bus_p_route_line_info_height">224px</dimen>
<dimen name="bus_p_route_line_map_view_height">510px</dimen>
<dimen name="bus_p_route_line_dividing_view_height">1px</dimen>
<dimen name="bus_p_route_line_dividing_view_height">3px</dimen>
<dimen name="bus_p_route_traffic_light_view_width">158px</dimen>
<dimen name="bus_p_route_traffic_light_view_height">90px</dimen>
@@ -16,8 +16,8 @@
<dimen name="bus_p_traffic_light_bg_width">158px</dimen>
<dimen name="bus_p_traffic_light_bg_height">90px</dimen>
<dimen name="bus_p_traffic_light_time_size">45px</dimen>
<dimen name="bus_p_traffic_light_time_view_width">100px</dimen>
<dimen name="bus_p_traffic_light_icon_size">100px</dimen>
<dimen name="bus_p_traffic_light_time_view_width">90px</dimen>
<dimen name="bus_p_traffic_light_icon_size">90px</dimen>
<dimen name="bus_p_traffic_light_bg_stroke_width">3px</dimen>
<dimen name="bus_p_route_dividing_line2_margin_top">224px</dimen>
@@ -42,7 +42,8 @@
<dimen name="bus_p_mid_station_circle_cor">6px</dimen>
<dimen name="bus_p_station_txt_size">50px</dimen>
<dimen name="bus_p_station_tag_txt_size">36px</dimen>
<dimen name="bus_p_station_item_height">75px</dimen>
<dimen name="bus_p_station_item_height">80px</dimen>
<dimen name="bus_p_station_item_middle_height">100px</dimen>
<dimen name="bus_p_station_tag_line_height">50px</dimen>
<dimen name="bus_p_station_tag_line_width">6px</dimen>

View File

@@ -22,17 +22,11 @@ import com.mogo.och.taxi.bean.OrderQueryRouteInfoRespBean;
import com.mogo.och.taxi.model.TaxiModel;
import com.mogo.och.taxi.presenter.TaxiPresenter;
import com.mogo.och.taxi.utils.PinYinUtil;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.mogo.och.taxi.utils.TPRouteDataTestUtils;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
import mogo.telematics.pad.MessagePad;
/**
* @author congtaowang
* @since 2021/1/18
@@ -359,200 +353,201 @@ public class TaxiFragment extends BaseTaxiTabFragment<TaxiFragment, TaxiPresente
}
private void testRouteInfoUpload() {
String listStr = "{\"models\":[{\n" +
"\t\t\"lat\": 40.19927810144466,\n" +
"\t\t\"lon\": 116.73527259387767\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19927836356079,\n" +
"\t\t\"lon\": 116.73513114732762\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19927759500293,\n" +
"\t\t\"lon\": 116.73497660879111\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.199264819842284,\n" +
"\t\t\"lon\": 116.73480063747202\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1992510141554,\n" +
"\t\t\"lon\": 116.73463922037767\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.199245872804,\n" +
"\t\t\"lon\": 116.73445960685193\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19924673374912,\n" +
"\t\t\"lon\": 116.73427704009703\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19924747108264,\n" +
"\t\t\"lon\": 116.7340707102972\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19924828745573,\n" +
"\t\t\"lon\": 116.73385916927226\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19924941093133,\n" +
"\t\t\"lon\": 116.73364048294795\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19924939253381,\n" +
"\t\t\"lon\": 116.73340837408566\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19924949105934,\n" +
"\t\t\"lon\": 116.73317368725336\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19925040039033,\n" +
"\t\t\"lon\": 116.73296532811216\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1992515355653,\n" +
"\t\t\"lon\": 116.73277787366743\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1992512720328,\n" +
"\t\t\"lon\": 116.73263377253741\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.199205174954606,\n" +
"\t\t\"lon\": 116.73249773114644\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1991015743076,\n" +
"\t\t\"lon\": 116.7324219601283\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.198971862686285,\n" +
"\t\t\"lon\": 116.73239393296355\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19883883071582,\n" +
"\t\t\"lon\": 116.73237676435652\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19870171355796,\n" +
"\t\t\"lon\": 116.73236052150362\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1985491853193,\n" +
"\t\t\"lon\": 116.73234157857011\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1983890047355,\n" +
"\t\t\"lon\": 116.73232167996464\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1982209877466,\n" +
"\t\t\"lon\": 116.73230101645792\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.198037574138326,\n" +
"\t\t\"lon\": 116.73227735486083\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19787327856243,\n" +
"\t\t\"lon\": 116.73225676816314\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19771917207499,\n" +
"\t\t\"lon\": 116.73223814728027\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.197548305175935,\n" +
"\t\t\"lon\": 116.73221624705808\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19739568979691,\n" +
"\t\t\"lon\": 116.73219618210774\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19724703821575,\n" +
"\t\t\"lon\": 116.73217598293311\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1970956560885,\n" +
"\t\t\"lon\": 116.73215773721505\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19697703483188,\n" +
"\t\t\"lon\": 116.73214337172284\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19687000725696,\n" +
"\t\t\"lon\": 116.73210037067965\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.196833449601726,\n" +
"\t\t\"lon\": 116.73196646708011\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19685833847804,\n" +
"\t\t\"lon\": 116.73181315361103\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.196889170203264,\n" +
"\t\t\"lon\": 116.73164355747393\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19692242860347,\n" +
"\t\t\"lon\": 116.7314555399657\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19696431701069,\n" +
"\t\t\"lon\": 116.7312261834129\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19700025925464,\n" +
"\t\t\"lon\": 116.73102774016093\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19703414798773,\n" +
"\t\t\"lon\": 116.73084270562073\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19707287604138,\n" +
"\t\t\"lon\": 116.73062835248406\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19710951629977,\n" +
"\t\t\"lon\": 116.73041744082339\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19714593807105,\n" +
"\t\t\"lon\": 116.73021414314803\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.197183297026285,\n" +
"\t\t\"lon\": 116.7300057066447\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.1972247359487,\n" +
"\t\t\"lon\": 116.7297751515664\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19726518822745,\n" +
"\t\t\"lon\": 116.72954958923812\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19730538240706,\n" +
"\t\t\"lon\": 116.72932440756041\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19734272112662,\n" +
"\t\t\"lon\": 116.72911631453036\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.197379191549075,\n" +
"\t\t\"lon\": 116.72890982812105\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.197417565369314,\n" +
"\t\t\"lon\": 116.72869447869044\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19746052080799,\n" +
"\t\t\"lon\": 116.72845641541247\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19750040582118,\n" +
"\t\t\"lon\": 116.72823569991117\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19753999704064,\n" +
"\t\t\"lon\": 116.72801998373052\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19757796882569,\n" +
"\t\t\"lon\": 116.72781280504363\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.197617062364586,\n" +
"\t\t\"lon\": 116.72759949431683\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19765391602761,\n" +
"\t\t\"lon\": 116.72739776789756\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19768973009218,\n" +
"\t\t\"lon\": 116.72719980764646\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.197726191028785,\n" +
"\t\t\"lon\": 116.72699719861669\n" +
"\t}, {\n" +
"\t\t\"lat\": 40.19776233489642,\n" +
"\t\t\"lon\": 116.72679516155276\n" +
"\t}]}\n";
List<MessagePad.Location> list = new ArrayList<>();
try {
JSONObject jsonObject = new JSONObject(listStr);
JSONArray jsonElements = jsonObject.getJSONArray("models");
for (int i = 0; i < jsonElements.length(); i++) {
JSONObject s = jsonElements.getJSONObject(i);
MessagePad.Location.Builder builder = MessagePad.Location.newBuilder();
builder.setLatitude(s.getDouble("lat"));
builder.setLongitude(s.getDouble("lon"));
list.add(builder.build());
}
TaxiModel.getInstance().updateOrderRoute(list);
TaxiModel.getInstance().updateOrderRouteInfo(list);
} catch (JSONException e) {
e.printStackTrace();
}
TPRouteDataTestUtils.converToRouteData();
// String listStr = "{\"models\":[{\n" +
// "\t\t\"lat\": 40.19927810144466,\n" +
// "\t\t\"lon\": 116.73527259387767\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19927836356079,\n" +
// "\t\t\"lon\": 116.73513114732762\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19927759500293,\n" +
// "\t\t\"lon\": 116.73497660879111\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.199264819842284,\n" +
// "\t\t\"lon\": 116.73480063747202\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.1992510141554,\n" +
// "\t\t\"lon\": 116.73463922037767\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.199245872804,\n" +
// "\t\t\"lon\": 116.73445960685193\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19924673374912,\n" +
// "\t\t\"lon\": 116.73427704009703\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19924747108264,\n" +
// "\t\t\"lon\": 116.7340707102972\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19924828745573,\n" +
// "\t\t\"lon\": 116.73385916927226\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19924941093133,\n" +
// "\t\t\"lon\": 116.73364048294795\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19924939253381,\n" +
// "\t\t\"lon\": 116.73340837408566\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19924949105934,\n" +
// "\t\t\"lon\": 116.73317368725336\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19925040039033,\n" +
// "\t\t\"lon\": 116.73296532811216\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.1992515355653,\n" +
// "\t\t\"lon\": 116.73277787366743\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.1992512720328,\n" +
// "\t\t\"lon\": 116.73263377253741\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.199205174954606,\n" +
// "\t\t\"lon\": 116.73249773114644\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.1991015743076,\n" +
// "\t\t\"lon\": 116.7324219601283\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.198971862686285,\n" +
// "\t\t\"lon\": 116.73239393296355\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19883883071582,\n" +
// "\t\t\"lon\": 116.73237676435652\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19870171355796,\n" +
// "\t\t\"lon\": 116.73236052150362\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.1985491853193,\n" +
// "\t\t\"lon\": 116.73234157857011\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.1983890047355,\n" +
// "\t\t\"lon\": 116.73232167996464\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.1982209877466,\n" +
// "\t\t\"lon\": 116.73230101645792\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.198037574138326,\n" +
// "\t\t\"lon\": 116.73227735486083\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19787327856243,\n" +
// "\t\t\"lon\": 116.73225676816314\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19771917207499,\n" +
// "\t\t\"lon\": 116.73223814728027\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.197548305175935,\n" +
// "\t\t\"lon\": 116.73221624705808\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19739568979691,\n" +
// "\t\t\"lon\": 116.73219618210774\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19724703821575,\n" +
// "\t\t\"lon\": 116.73217598293311\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.1970956560885,\n" +
// "\t\t\"lon\": 116.73215773721505\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19697703483188,\n" +
// "\t\t\"lon\": 116.73214337172284\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19687000725696,\n" +
// "\t\t\"lon\": 116.73210037067965\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.196833449601726,\n" +
// "\t\t\"lon\": 116.73196646708011\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19685833847804,\n" +
// "\t\t\"lon\": 116.73181315361103\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.196889170203264,\n" +
// "\t\t\"lon\": 116.73164355747393\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19692242860347,\n" +
// "\t\t\"lon\": 116.7314555399657\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19696431701069,\n" +
// "\t\t\"lon\": 116.7312261834129\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19700025925464,\n" +
// "\t\t\"lon\": 116.73102774016093\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19703414798773,\n" +
// "\t\t\"lon\": 116.73084270562073\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19707287604138,\n" +
// "\t\t\"lon\": 116.73062835248406\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19710951629977,\n" +
// "\t\t\"lon\": 116.73041744082339\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19714593807105,\n" +
// "\t\t\"lon\": 116.73021414314803\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.197183297026285,\n" +
// "\t\t\"lon\": 116.7300057066447\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.1972247359487,\n" +
// "\t\t\"lon\": 116.7297751515664\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19726518822745,\n" +
// "\t\t\"lon\": 116.72954958923812\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19730538240706,\n" +
// "\t\t\"lon\": 116.72932440756041\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19734272112662,\n" +
// "\t\t\"lon\": 116.72911631453036\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.197379191549075,\n" +
// "\t\t\"lon\": 116.72890982812105\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.197417565369314,\n" +
// "\t\t\"lon\": 116.72869447869044\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19746052080799,\n" +
// "\t\t\"lon\": 116.72845641541247\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19750040582118,\n" +
// "\t\t\"lon\": 116.72823569991117\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19753999704064,\n" +
// "\t\t\"lon\": 116.72801998373052\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19757796882569,\n" +
// "\t\t\"lon\": 116.72781280504363\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.197617062364586,\n" +
// "\t\t\"lon\": 116.72759949431683\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19765391602761,\n" +
// "\t\t\"lon\": 116.72739776789756\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19768973009218,\n" +
// "\t\t\"lon\": 116.72719980764646\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.197726191028785,\n" +
// "\t\t\"lon\": 116.72699719861669\n" +
// "\t}, {\n" +
// "\t\t\"lat\": 40.19776233489642,\n" +
// "\t\t\"lon\": 116.72679516155276\n" +
// "\t}]}\n";
//
//
// List<MessagePad.Location> list = new ArrayList<>();
//
// try {
// JSONObject jsonObject = new JSONObject(listStr);
// JSONArray jsonElements = jsonObject.getJSONArray("models");
// for (int i = 0; i < jsonElements.length(); i++) {
// JSONObject s = jsonElements.getJSONObject(i);
// MessagePad.Location.Builder builder = MessagePad.Location.newBuilder();
// builder.setLatitude(s.getDouble("lat"));
// builder.setLongitude(s.getDouble("lon"));
// list.add(builder.build());
// }
// TaxiModel.getInstance().updateOrderRoute(list);
// TaxiModel.getInstance().updateOrderRouteInfo(list);
// } catch (JSONException e) {
// e.printStackTrace();
// }
}
public void clickTestBar() {

File diff suppressed because one or more lines are too long

View File

@@ -123,6 +123,13 @@ public class MogoApplication extends MainMoGoApplication {
} else if (DebugConfig.getProductFlavor().equals("fPadLenovoOchBusPassenger")) {
//是否显示 红绿等
HmiBuildConfig.isShowTrafficLightView = false;
//是否显示 限速UI
HmiBuildConfig.isShowLimitingVelocityView = false;
//是否显示 路侧监控
HmiBuildConfig.isShowCameraView = false;
//白天模式
FunctionBuildConfig.skinMode = 1;
}
//och模块
MogoModulePaths.addModuleFunction(new MogoModule("/och/api", "IMoGoFunctionProvider"));

View File

@@ -82,7 +82,7 @@ MOGO_LOCATION_VERSION=1.3.52
MOGO_TELEMATIC_VERSION=1.3.52
######## MogoAiCloudSDK Version ########
# 自研地图
MAP_SDK_VERSION=2.1.0.3
MAP_SDK_VERSION=2.1.0.5
MAP_SDK_OPERATION_VERSION=1.0.12
# websocket
WEBSOCKET_VERSION=1.1.7