diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.java index c341867ff3..30cbec38f9 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.java @@ -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() { diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java index c52d87aa10..c8760c77c0 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java @@ -329,6 +329,9 @@ public class BusPassengerModel { if (DebugConfig.isDebug()) { // TipToast.shortTip("到达目的地"); } + if (mADASStatusCallback != null){ + mADASStatusCallback.onAutopilotArriveEnd(); + } } }; diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerBaseFragment.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerBaseFragment.java index 870974f144..2de8fb267d 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerBaseFragment.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerBaseFragment.java @@ -115,7 +115,7 @@ public abstract class BusPassengerBaseFragment距离 " + "" + dis + "" + " "+disUnit+"" - + ""+" "+"剩余 " + "" + (int)Math.ceil((double)timeInSecond/ 60f) + "" + " 分钟"; + + "   剩余 " + "" + (int)Math.ceil((double)timeInSecond/ 60f) + "" + " 分钟"; mCurrentArriveTip.setText(Html.fromHtml(strHtml2)); } diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerMapDirectionView.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerMapDirectionView.java index 7ca457caee..65c3593f31 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerMapDirectionView.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerMapDirectionView.java @@ -56,14 +56,17 @@ public class BusPassengerMapDirectionView private Marker mStartMarker; private Marker mEndMarker; + private int mCurrentIndex = -1; + private int zoomLevel = 13; private List mCoordinatesLatLng = new ArrayList<>(); - private List mWayPointsLatLng = new ArrayList<>(); + private List mLinePointsLatLng = new ArrayList<>(); private Polyline mPolyline; private CameraUpdate mCameraUpdate; private Context mContext; private List colorList = new ArrayList<>(); + private List 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 CoordinateConverterFrom84ForList(Context mContext, List mogoLatLngList) { - List 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 coordinates) { - mCoordinatesLatLng.clear(); - List latLngs = CoordinateConverterFrom84ForList(mContext, coordinates); - mCoordinatesLatLng.addAll(latLngs); - } - - public void setCoordinatesLatLng(List latLngs){ + public void setCoordinatesLatLng(List latLngs) { mCoordinatesLatLng.clear(); mCoordinatesLatLng.addAll(latLngs); } - public void setWayPointMarker(List wayPointLatLngs){ - mWayPointsLatLng.clear(); - mCoordinatesLatLng.addAll(wayPointLatLngs); + public void setLinePointMarkerAndDraw(List 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 diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java index 52187371bc..dab37fe048 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java @@ -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 mStationsList = new ArrayList<>(); - private List mWayPointsList = new ArrayList<>(); + private List 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 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 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 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 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 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 diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerTrafficLightView.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerTrafficLightView.java index aea35cc715..16cda08315 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerTrafficLightView.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerTrafficLightView.java @@ -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(""); diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/utils/BPCoordinateCalculateRouteUtil.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/utils/BPCoordinateCalculateRouteUtil.java index 9ddb9522cf..077db0ec52 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/utils/BPCoordinateCalculateRouteUtil.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/utils/BPCoordinateCalculateRouteUtil.java @@ -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); diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/utils/BPRouteDataTestUtils.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/utils/BPRouteDataTestUtils.java new file mode 100644 index 0000000000..e04070b965 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/utils/BPRouteDataTestUtils.java @@ -0,0 +1,222 @@ +package com.mogo.och.bus.passenger.utils; + +import com.mogo.och.bus.passenger.model.BusPassengerModel; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import java.util.ArrayList; +import java.util.List; + +import mogo.telematics.pad.MessagePad; + +/** + * @author: wangmingjun + * @date: 2022/4/13 + */ +public class BPRouteDataTestUtils { + + //13号路口起-13号路口终 +// static String jsonStr ="{\n" + +// " \"models\": [\n" + +// " {\n" + +// " \"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19927760268911,\"lon\":116.73512607061035,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19927736555187,\"lon\":116.73498243020299,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19927135941599,\"lon\":116.73482951462647,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199260672670036,\"lon\":116.73468429259535,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199251260349946,\"lon\":116.73453933465,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19924691997577,\"lon\":116.7343756435551,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199247953493625,\"lon\":116.73421240809087,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19924986849947,\"lon\":116.73400425509712,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199249431152175,\"lon\":116.73378579041055,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199248921305724,\"lon\":116.73357811807278,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19925012387371,\"lon\":116.73337650020184,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199252270195075,\"lon\":116.73318223781153,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1992521615169,\"lon\":116.73298632625203,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19925202633083,\"lon\":116.73279582043983,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199261230205735,\"lon\":116.73263403473568,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199327991681926,\"lon\":116.73251962434813,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19944850496711,\"lon\":116.73249661840195,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199582026896415,\"lon\":116.73251038561487,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199743326352014,\"lon\":116.73253087453938,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199908347167394,\"lon\":116.73255070500186,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200065950595445,\"lon\":116.7325720694418,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20022747460407,\"lon\":116.73259461416663,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200384057310536,\"lon\":116.73261575018056,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20053849777916,\"lon\":116.73263451936387,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200696919444624,\"lon\":116.7326540541723,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2008524952796,\"lon\":116.7326743511824,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20101429705625,\"lon\":116.73269393580199,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20118279997041,\"lon\":116.73271564378308,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201342388452076,\"lon\":116.73273653366076,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201476063822355,\"lon\":116.73275292393079,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20163479199852,\"lon\":116.73277440686762,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20181243476041,\"lon\":116.7328052766508,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201991767093304,\"lon\":116.7328453845644,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20215573733484,\"lon\":116.73287624009339,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202313648759784,\"lon\":116.73289887933315,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202434745374454,\"lon\":116.7329182210956,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20253164952098,\"lon\":116.73297539811277,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20258043275509,\"lon\":116.73312335324984,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20258233576585,\"lon\":116.73331077089557,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20257107560234,\"lon\":116.73351244039137,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202561578580514,\"lon\":116.73370176209845,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20256256788661,\"lon\":116.73391325024126,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20255633158834,\"lon\":116.73413195000244,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202543311179575,\"lon\":116.73436614303907,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20253067346457,\"lon\":116.73458032609663,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20251776111356,\"lon\":116.73477082198242,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202503997557805,\"lon\":116.73498624001282,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20249129260376,\"lon\":116.73518976336872,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247877796589,\"lon\":116.73537786253135,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246651610268,\"lon\":116.73559239130266,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20245754388014,\"lon\":116.73574239922202,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20244749208,\"lon\":116.73589674090469,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243806550113,\"lon\":116.73607057284322,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243550556816,\"lon\":116.73628106525871,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243654127756,\"lon\":116.7364949950665,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243738221016,\"lon\":116.7367061649993,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243672476754,\"lon\":116.73691115930336,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243590788176,\"lon\":116.73710722104272,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202436434375336,\"lon\":116.73730688607075,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243749821501,\"lon\":116.73750140347998,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243625962803,\"lon\":116.73771330926793,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202434515480725,\"lon\":116.73791895606205,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2024326561388,\"lon\":116.73815206945737,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243092086137,\"lon\":116.73838655528765,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202430876006126,\"lon\":116.73861890759498,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242914053177,\"lon\":116.73882029918758,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242843336561,\"lon\":116.73904465495175,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242661219026,\"lon\":116.73922453252953,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202426462811076,\"lon\":116.7393708046956,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242687134937,\"lon\":116.73954685547025,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242694967377,\"lon\":116.73975021183773,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202424630601236,\"lon\":116.73999740812975,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202422502184625,\"lon\":116.74028266774337,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202419634158936,\"lon\":116.7405942561498,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241975959762,\"lon\":116.7409069557092,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241920524113,\"lon\":116.74120156191647,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241765540262,\"lon\":116.74149288504978,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241569149764,\"lon\":116.7418080096762,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202414529497084,\"lon\":116.74210262897205,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241419532155,\"lon\":116.74241767661879,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202413879360954,\"lon\":116.7427571218185,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241287045245,\"lon\":116.7431284691325,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241214965105,\"lon\":116.74343354359334,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241141271715,\"lon\":116.7437220210538,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2024080520075,\"lon\":116.74399113498052,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202391714280026,\"lon\":116.74427625698272,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20238163805639,\"lon\":116.74452083315958,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202379293010274,\"lon\":116.74475703837204,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202379007817086,\"lon\":116.7449961645494,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20237814181231,\"lon\":116.7452036063558,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202375477619896,\"lon\":116.74539567654291,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2023632396621,\"lon\":116.74555457589031,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20229396554444,\"lon\":116.7456716047369,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20217800547467,\"lon\":116.74574081942625,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202047498095304,\"lon\":116.74573659255675,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20188573786706,\"lon\":116.74571018281719,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201738240263026,\"lon\":116.74568463148606,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20157507049073,\"lon\":116.74565525041498,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20137985142042,\"lon\":116.745619970576,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201187335613575,\"lon\":116.74558631350607,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20098251429043,\"lon\":116.74555055587679,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2007748533628,\"lon\":116.74551426934663,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20057082986032,\"lon\":116.74547749663195,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20036944224329,\"lon\":116.74544156175533,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20016365229035,\"lon\":116.74540577510051,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1999958572445,\"lon\":116.74537505807076,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19984100521566,\"lon\":116.7453433678602,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1996863960282,\"lon\":116.74529675648621,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19953919567943,\"lon\":116.74525916493474,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19940587189373,\"lon\":116.74523402869453,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19929047792381,\"lon\":116.74518617038383,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922141745155,\"lon\":116.74506912884067,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19920798885308,\"lon\":116.744896716334,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19920912644279,\"lon\":116.74467216715483,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199209186509314,\"lon\":116.74448257515108,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19920910709997,\"lon\":116.74430613406223,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1992100786082,\"lon\":116.74410888316238,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921081961254,\"lon\":116.74391968819582,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921040855518,\"lon\":116.7437082083402,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921085053439,\"lon\":116.74346931155634,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921197237373,\"lon\":116.74325149697013,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921248248983,\"lon\":116.74301103786591,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1992139724646,\"lon\":116.74277237066539,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199215818352386,\"lon\":116.74253219408898,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199216175018876,\"lon\":116.74228853120842,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199215970354246,\"lon\":116.74204663206451,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199216627492966,\"lon\":116.74183871233049,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921789170398,\"lon\":116.74165788334192,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922000138535,\"lon\":116.74144512197054,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199221559127494,\"lon\":116.741249370491,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922287231889,\"lon\":116.7410525810756,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922229019589,\"lon\":116.74085266662037,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1992216995901,\"lon\":116.74061957723823,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922263073874,\"lon\":116.74041638149129,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922478093337,\"lon\":116.7402123910757,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199227066091595,\"lon\":116.74003419421553,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199228634241756,\"lon\":116.73985841944678,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922951636012,\"lon\":116.7397079274105,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199252095329484,\"lon\":116.73956265582487,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199346162997905,\"lon\":116.73944690416265,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199470799628024,\"lon\":116.73941941053417,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19962513314346,\"lon\":116.7394280706812,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199780626058924,\"lon\":116.73944255215424,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199961525343376,\"lon\":116.73945856750177,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20016196947193,\"lon\":116.73947572081121,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200384479551936,\"lon\":116.7394949225795,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200595083817475,\"lon\":116.73951027963179,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200792203321086,\"lon\":116.73952526850614,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200985930701684,\"lon\":116.73954125209579,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20115978977055,\"lon\":116.73955610094161,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201321019536124,\"lon\":116.7395695239138,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20147117943043,\"lon\":116.7395823299481,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20163699848565,\"lon\":116.73959633422596,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20178484338371,\"lon\":116.7396085776486,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201962185646316,\"lon\":116.73962351991214,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2021018923927,\"lon\":116.7396354059821,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2022137620686,\"lon\":116.73964348380458,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20232600820075,\"lon\":116.73961190446633,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241090270993,\"lon\":116.73951649703137,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20245777783807,\"lon\":116.73937664238166,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246906634823,\"lon\":116.73920146119093,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202470916682884,\"lon\":116.73898763065634,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247034830421,\"lon\":116.73878158418357,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246978204673,\"lon\":116.73857680142473,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247082638905,\"lon\":116.73834517890637,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202471943178196,\"lon\":116.7381047689514,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247131648035,\"lon\":116.73787761484981,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202470799473765,\"lon\":116.73766230702478,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247013054322,\"lon\":116.73743619407796,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246999515433,\"lon\":116.73724916823292,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247199652478,\"lon\":116.73704888970806,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202473960263525,\"lon\":116.73684083235807,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202474504753205,\"lon\":116.73665462440796,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247501354581,\"lon\":116.73650710371837,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246541231906,\"lon\":116.73635807696789,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202426768984274,\"lon\":116.73622283382787,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20236638788854,\"lon\":116.73610589402243,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20227106919894,\"lon\":116.73600895001849,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2021428343084,\"lon\":116.73596816020945,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20197815580698,\"lon\":116.73594623645097,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20181789535303,\"lon\":116.73593148707488,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201667906886954,\"lon\":116.73591743008926,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201505897730755,\"lon\":116.7359002912543,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20135083580946,\"lon\":116.73588579696379,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20118617904595,\"lon\":116.73586970398149,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20102374028594,\"lon\":116.73585314703226,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20085554043743,\"lon\":116.73583763953049,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20069451888229,\"lon\":116.73582073901778,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200530837344964,\"lon\":116.73580314359012,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2003608457064,\"lon\":116.73578183888779,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20021770046798,\"lon\":116.73575292592922,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20003454701824,\"lon\":116.7357174959358,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19986125116602,\"lon\":116.73569499961796,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19969408518737,\"lon\":116.73567725223492,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19955533048882,\"lon\":116.73566375985422,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19943174810538,\"lon\":116.73564927714162,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19933167546824,\"lon\":116.735595995086,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199280357603875,\"lon\":116.73546293260645,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19927848361656,\"lon\":116.73531579486274,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19928127892504,\"lon\":116.73505848474375,\"speed\": 0.0\n" + +// " }\n" + +// " ]\n" + +// "}"; + + //13号路口西-汇源果汁 + static String jsonStr = "{\"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"; + public static void converToRouteData(){ + List list = new ArrayList<>(); + + try { + JSONObject jsonObject = new JSONObject(jsonStr); + 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()); + } + BusPassengerModel.getInstance().updateRoutePoints(list); + } catch (JSONException e) { + e.printStackTrace(); + } + } +} diff --git a/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_light_green_nor.png b/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_light_green_nor.png index 76787134b6..939d5c0214 100644 Binary files a/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_light_green_nor.png and b/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_light_green_nor.png differ diff --git a/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_light_red_nor.png b/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_light_red_nor.png index 4de4a75e1b..97d774140a 100644 Binary files a/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_light_red_nor.png and b/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_light_red_nor.png differ diff --git a/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_light_yellow_nor.png b/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_light_yellow_nor.png index 74dec29540..a782062c34 100644 Binary files a/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_light_yellow_nor.png and b/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_light_yellow_nor.png differ diff --git a/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_map_view_dir_end.png b/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_map_view_dir_end.png deleted file mode 100644 index ff04c01f13..0000000000 Binary files a/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_map_view_dir_end.png and /dev/null differ diff --git a/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_map_view_dir_end_point.png b/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_map_view_dir_end_point.png new file mode 100644 index 0000000000..1e64713481 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_map_view_dir_end_point.png differ diff --git a/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_map_view_dir_way_point.png b/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_map_view_dir_way_point.png index cb158ffb83..ff04c01f13 100644 Binary files a/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_map_view_dir_way_point.png and b/OCH/mogo-och-bus-passenger/src/main/res/drawable-sw320dp-xhdpi/bus_p_map_view_dir_way_point.png differ diff --git a/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_light_green_nor.png b/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_light_green_nor.png index 76787134b6..939d5c0214 100644 Binary files a/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_light_green_nor.png and b/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_light_green_nor.png differ diff --git a/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_light_red_nor.png b/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_light_red_nor.png index 4de4a75e1b..97d774140a 100644 Binary files a/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_light_red_nor.png and b/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_light_red_nor.png differ diff --git a/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_light_yellow_nor.png b/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_light_yellow_nor.png index 74dec29540..a782062c34 100644 Binary files a/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_light_yellow_nor.png and b/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_light_yellow_nor.png differ diff --git a/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_map_view_dir_end.png b/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_map_view_dir_end.png deleted file mode 100644 index ff04c01f13..0000000000 Binary files a/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_map_view_dir_end.png and /dev/null differ diff --git a/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_map_view_dir_end_point.png b/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_map_view_dir_end_point.png new file mode 100644 index 0000000000..1e64713481 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_map_view_dir_end_point.png differ diff --git a/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_map_view_dir_start.png b/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_map_view_dir_start.png deleted file mode 100644 index 22d8f225c2..0000000000 Binary files a/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_map_view_dir_start.png and /dev/null differ diff --git a/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_map_view_dir_way_point.png b/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_map_view_dir_way_point.png index cb158ffb83..ff04c01f13 100644 Binary files a/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_map_view_dir_way_point.png and b/OCH/mogo-och-bus-passenger/src/main/res/drawable-xhdpi/bus_p_map_view_dir_way_point.png differ diff --git a/OCH/mogo-och-bus-passenger/src/main/res/drawable/bus_p_route_bg.xml b/OCH/mogo-och-bus-passenger/src/main/res/drawable/bus_p_route_bg.xml index a1e022a3bc..73fbe1f005 100644 --- a/OCH/mogo-och-bus-passenger/src/main/res/drawable/bus_p_route_bg.xml +++ b/OCH/mogo-och-bus-passenger/src/main/res/drawable/bus_p_route_bg.xml @@ -4,8 +4,8 @@ diff --git a/OCH/mogo-och-bus-passenger/src/main/res/layout/bus_p_route_fragment.xml b/OCH/mogo-och-bus-passenger/src/main/res/layout/bus_p_route_fragment.xml index 3f4fd3015c..31cab964c2 100644 --- a/OCH/mogo-och-bus-passenger/src/main/res/layout/bus_p_route_fragment.xml +++ b/OCH/mogo-och-bus-passenger/src/main/res/layout/bus_p_route_fragment.xml @@ -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" /> diff --git a/OCH/mogo-och-bus-passenger/src/main/res/layout/bus_p_stations_end_item.xml b/OCH/mogo-och-bus-passenger/src/main/res/layout/bus_p_stations_end_item.xml index f530b3ea84..3468664cc3 100644 --- a/OCH/mogo-och-bus-passenger/src/main/res/layout/bus_p_stations_end_item.xml +++ b/OCH/mogo-och-bus-passenger/src/main/res/layout/bus_p_stations_end_item.xml @@ -50,11 +50,13 @@ app:layout_constraintRight_toRightOf="parent" app:layout_constraintBottom_toBottomOf="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" /> diff --git a/OCH/mogo-och-bus-passenger/src/main/res/values-sw320dp/dimens.xml b/OCH/mogo-och-bus-passenger/src/main/res/values-sw320dp/dimens.xml index 3dc928c0b7..a1fc427a76 100644 --- a/OCH/mogo-och-bus-passenger/src/main/res/values-sw320dp/dimens.xml +++ b/OCH/mogo-och-bus-passenger/src/main/res/values-sw320dp/dimens.xml @@ -4,10 +4,10 @@ 40px 40px 40px - 70px + 110px 224px 510px - 1px + 3px 158px 90px @@ -15,8 +15,8 @@ 158px 90px 45px - 100px - 100px + 90px + 90px 3px 224px @@ -41,7 +41,8 @@ 6px 50px 36px - 75px + 80px + 100px 50px 6px diff --git a/OCH/mogo-och-bus-passenger/src/main/res/values/colors.xml b/OCH/mogo-och-bus-passenger/src/main/res/values/colors.xml index eb3a91012c..06035c5d4b 100644 --- a/OCH/mogo-och-bus-passenger/src/main/res/values/colors.xml +++ b/OCH/mogo-och-bus-passenger/src/main/res/values/colors.xml @@ -25,4 +25,5 @@ #2D3E5F #E6E9EFFC #33394C63 + #2D3E5F \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/main/res/values/dimens.xml b/OCH/mogo-och-bus-passenger/src/main/res/values/dimens.xml index b43711e918..bb114661c1 100644 --- a/OCH/mogo-och-bus-passenger/src/main/res/values/dimens.xml +++ b/OCH/mogo-och-bus-passenger/src/main/res/values/dimens.xml @@ -5,10 +5,10 @@ 40px 40px 40px - 70px + 110px 224px 510px - 1px + 3px 158px 90px @@ -16,8 +16,8 @@ 158px 90px 45px - 100px - 100px + 90px + 90px 3px 224px @@ -42,7 +42,8 @@ 6px 50px 36px - 75px + 80px + 100px 50px 6px diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiFragment.java index e395d1894c..0a9bdcb5dc 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiFragment.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiFragment.java @@ -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 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 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() { diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/utils/TPRouteDataTestUtils.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/utils/TPRouteDataTestUtils.java new file mode 100644 index 0000000000..472d0bbf27 --- /dev/null +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/utils/TPRouteDataTestUtils.java @@ -0,0 +1,46 @@ +package com.mogo.och.taxi.utils; + +import com.mogo.och.taxi.model.TaxiModel; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import java.util.ArrayList; +import java.util.List; + +import mogo.telematics.pad.MessagePad; + +/** + * @author: wangmingjun + * @date: 2022/4/13 + */ +public class TPRouteDataTestUtils { + + static String jsonStr ="{\n" + + " \"models\": [\n" + + " {\n" + + " \"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19927760268911,\"lon\":116.73512607061035,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19927736555187,\"lon\":116.73498243020299,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19927135941599,\"lon\":116.73482951462647,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199260672670036,\"lon\":116.73468429259535,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199251260349946,\"lon\":116.73453933465,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19924691997577,\"lon\":116.7343756435551,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199247953493625,\"lon\":116.73421240809087,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19924986849947,\"lon\":116.73400425509712,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199249431152175,\"lon\":116.73378579041055,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199248921305724,\"lon\":116.73357811807278,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19925012387371,\"lon\":116.73337650020184,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199252270195075,\"lon\":116.73318223781153,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1992521615169,\"lon\":116.73298632625203,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19925202633083,\"lon\":116.73279582043983,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199261230205735,\"lon\":116.73263403473568,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199327991681926,\"lon\":116.73251962434813,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19944850496711,\"lon\":116.73249661840195,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199582026896415,\"lon\":116.73251038561487,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199743326352014,\"lon\":116.73253087453938,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199908347167394,\"lon\":116.73255070500186,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200065950595445,\"lon\":116.7325720694418,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20022747460407,\"lon\":116.73259461416663,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200384057310536,\"lon\":116.73261575018056,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20053849777916,\"lon\":116.73263451936387,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200696919444624,\"lon\":116.7326540541723,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2008524952796,\"lon\":116.7326743511824,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20101429705625,\"lon\":116.73269393580199,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20118279997041,\"lon\":116.73271564378308,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201342388452076,\"lon\":116.73273653366076,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201476063822355,\"lon\":116.73275292393079,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20163479199852,\"lon\":116.73277440686762,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20181243476041,\"lon\":116.7328052766508,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201991767093304,\"lon\":116.7328453845644,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20215573733484,\"lon\":116.73287624009339,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202313648759784,\"lon\":116.73289887933315,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202434745374454,\"lon\":116.7329182210956,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20253164952098,\"lon\":116.73297539811277,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20258043275509,\"lon\":116.73312335324984,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20258233576585,\"lon\":116.73331077089557,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20257107560234,\"lon\":116.73351244039137,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202561578580514,\"lon\":116.73370176209845,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20256256788661,\"lon\":116.73391325024126,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20255633158834,\"lon\":116.73413195000244,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202543311179575,\"lon\":116.73436614303907,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20253067346457,\"lon\":116.73458032609663,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20251776111356,\"lon\":116.73477082198242,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202503997557805,\"lon\":116.73498624001282,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20249129260376,\"lon\":116.73518976336872,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247877796589,\"lon\":116.73537786253135,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246651610268,\"lon\":116.73559239130266,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20245754388014,\"lon\":116.73574239922202,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20244749208,\"lon\":116.73589674090469,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243806550113,\"lon\":116.73607057284322,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243550556816,\"lon\":116.73628106525871,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243654127756,\"lon\":116.7364949950665,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243738221016,\"lon\":116.7367061649993,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243672476754,\"lon\":116.73691115930336,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243590788176,\"lon\":116.73710722104272,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202436434375336,\"lon\":116.73730688607075,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243749821501,\"lon\":116.73750140347998,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243625962803,\"lon\":116.73771330926793,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202434515480725,\"lon\":116.73791895606205,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2024326561388,\"lon\":116.73815206945737,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243092086137,\"lon\":116.73838655528765,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202430876006126,\"lon\":116.73861890759498,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242914053177,\"lon\":116.73882029918758,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242843336561,\"lon\":116.73904465495175,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242661219026,\"lon\":116.73922453252953,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202426462811076,\"lon\":116.7393708046956,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242687134937,\"lon\":116.73954685547025,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242694967377,\"lon\":116.73975021183773,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202424630601236,\"lon\":116.73999740812975,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202422502184625,\"lon\":116.74028266774337,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202419634158936,\"lon\":116.7405942561498,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241975959762,\"lon\":116.7409069557092,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241920524113,\"lon\":116.74120156191647,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241765540262,\"lon\":116.74149288504978,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241569149764,\"lon\":116.7418080096762,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202414529497084,\"lon\":116.74210262897205,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241419532155,\"lon\":116.74241767661879,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202413879360954,\"lon\":116.7427571218185,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241287045245,\"lon\":116.7431284691325,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241214965105,\"lon\":116.74343354359334,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241141271715,\"lon\":116.7437220210538,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2024080520075,\"lon\":116.74399113498052,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202391714280026,\"lon\":116.74427625698272,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20238163805639,\"lon\":116.74452083315958,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202379293010274,\"lon\":116.74475703837204,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202379007817086,\"lon\":116.7449961645494,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20237814181231,\"lon\":116.7452036063558,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202375477619896,\"lon\":116.74539567654291,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2023632396621,\"lon\":116.74555457589031,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20229396554444,\"lon\":116.7456716047369,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20217800547467,\"lon\":116.74574081942625,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202047498095304,\"lon\":116.74573659255675,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20188573786706,\"lon\":116.74571018281719,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201738240263026,\"lon\":116.74568463148606,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20157507049073,\"lon\":116.74565525041498,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20137985142042,\"lon\":116.745619970576,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201187335613575,\"lon\":116.74558631350607,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20098251429043,\"lon\":116.74555055587679,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2007748533628,\"lon\":116.74551426934663,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20057082986032,\"lon\":116.74547749663195,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20036944224329,\"lon\":116.74544156175533,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20016365229035,\"lon\":116.74540577510051,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1999958572445,\"lon\":116.74537505807076,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19984100521566,\"lon\":116.7453433678602,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1996863960282,\"lon\":116.74529675648621,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19953919567943,\"lon\":116.74525916493474,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19940587189373,\"lon\":116.74523402869453,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19929047792381,\"lon\":116.74518617038383,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922141745155,\"lon\":116.74506912884067,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19920798885308,\"lon\":116.744896716334,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19920912644279,\"lon\":116.74467216715483,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199209186509314,\"lon\":116.74448257515108,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19920910709997,\"lon\":116.74430613406223,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1992100786082,\"lon\":116.74410888316238,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921081961254,\"lon\":116.74391968819582,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921040855518,\"lon\":116.7437082083402,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921085053439,\"lon\":116.74346931155634,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921197237373,\"lon\":116.74325149697013,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921248248983,\"lon\":116.74301103786591,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1992139724646,\"lon\":116.74277237066539,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199215818352386,\"lon\":116.74253219408898,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199216175018876,\"lon\":116.74228853120842,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199215970354246,\"lon\":116.74204663206451,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199216627492966,\"lon\":116.74183871233049,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921789170398,\"lon\":116.74165788334192,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922000138535,\"lon\":116.74144512197054,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199221559127494,\"lon\":116.741249370491,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922287231889,\"lon\":116.7410525810756,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922229019589,\"lon\":116.74085266662037,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1992216995901,\"lon\":116.74061957723823,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922263073874,\"lon\":116.74041638149129,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922478093337,\"lon\":116.7402123910757,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199227066091595,\"lon\":116.74003419421553,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199228634241756,\"lon\":116.73985841944678,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922951636012,\"lon\":116.7397079274105,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199252095329484,\"lon\":116.73956265582487,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199346162997905,\"lon\":116.73944690416265,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199470799628024,\"lon\":116.73941941053417,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19962513314346,\"lon\":116.7394280706812,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199780626058924,\"lon\":116.73944255215424,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199961525343376,\"lon\":116.73945856750177,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20016196947193,\"lon\":116.73947572081121,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200384479551936,\"lon\":116.7394949225795,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200595083817475,\"lon\":116.73951027963179,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200792203321086,\"lon\":116.73952526850614,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200985930701684,\"lon\":116.73954125209579,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20115978977055,\"lon\":116.73955610094161,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201321019536124,\"lon\":116.7395695239138,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20147117943043,\"lon\":116.7395823299481,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20163699848565,\"lon\":116.73959633422596,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20178484338371,\"lon\":116.7396085776486,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201962185646316,\"lon\":116.73962351991214,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2021018923927,\"lon\":116.7396354059821,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2022137620686,\"lon\":116.73964348380458,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20232600820075,\"lon\":116.73961190446633,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241090270993,\"lon\":116.73951649703137,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20245777783807,\"lon\":116.73937664238166,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246906634823,\"lon\":116.73920146119093,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202470916682884,\"lon\":116.73898763065634,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247034830421,\"lon\":116.73878158418357,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246978204673,\"lon\":116.73857680142473,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247082638905,\"lon\":116.73834517890637,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202471943178196,\"lon\":116.7381047689514,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247131648035,\"lon\":116.73787761484981,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202470799473765,\"lon\":116.73766230702478,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247013054322,\"lon\":116.73743619407796,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246999515433,\"lon\":116.73724916823292,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247199652478,\"lon\":116.73704888970806,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202473960263525,\"lon\":116.73684083235807,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202474504753205,\"lon\":116.73665462440796,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247501354581,\"lon\":116.73650710371837,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246541231906,\"lon\":116.73635807696789,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202426768984274,\"lon\":116.73622283382787,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20236638788854,\"lon\":116.73610589402243,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20227106919894,\"lon\":116.73600895001849,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2021428343084,\"lon\":116.73596816020945,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20197815580698,\"lon\":116.73594623645097,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20181789535303,\"lon\":116.73593148707488,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201667906886954,\"lon\":116.73591743008926,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201505897730755,\"lon\":116.7359002912543,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20135083580946,\"lon\":116.73588579696379,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20118617904595,\"lon\":116.73586970398149,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20102374028594,\"lon\":116.73585314703226,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20085554043743,\"lon\":116.73583763953049,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20069451888229,\"lon\":116.73582073901778,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200530837344964,\"lon\":116.73580314359012,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2003608457064,\"lon\":116.73578183888779,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20021770046798,\"lon\":116.73575292592922,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20003454701824,\"lon\":116.7357174959358,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19986125116602,\"lon\":116.73569499961796,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19969408518737,\"lon\":116.73567725223492,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19955533048882,\"lon\":116.73566375985422,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19943174810538,\"lon\":116.73564927714162,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19933167546824,\"lon\":116.735595995086,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199280357603875,\"lon\":116.73546293260645,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19927848361656,\"lon\":116.73531579486274,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19928127892504,\"lon\":116.73505848474375,\"speed\": 0.0\n" + + " }\n" + + " ]\n" + + "}"; + public static void converToRouteData(){ + List list = new ArrayList<>(); + + try { + JSONObject jsonObject = new JSONObject(jsonStr); + 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(); + } + } +} diff --git a/app/src/main/java/com/mogo/launcher/MogoApplication.java b/app/src/main/java/com/mogo/launcher/MogoApplication.java index 525609d945..7ea1b64e0d 100644 --- a/app/src/main/java/com/mogo/launcher/MogoApplication.java +++ b/app/src/main/java/com/mogo/launcher/MogoApplication.java @@ -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")); diff --git a/gradle.properties b/gradle.properties index cc19574c73..6cb026d147 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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