[2.12.0] taxi 乘客屏增加无轨迹导航
This commit is contained in:
@@ -13,4 +13,5 @@ import mogo.telematics.pad.MessagePad;
|
||||
public interface IOCHTaxiPassengerAutopilotPlanningCallback {
|
||||
void setLineMarker(List<LatLng> models);
|
||||
void routeResultByServer(List<LatLng> models,int haveArrivedIndex);
|
||||
void showRottingMapView();
|
||||
}
|
||||
@@ -1,11 +1,7 @@
|
||||
package com.mogo.och.taxi.passenger.callback;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrderQueryRespBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created on 2021/9/8
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.amap.api.navi.model.NaviLatLng;
|
||||
import com.elegant.network.utils.GsonUtil;
|
||||
import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager;
|
||||
import com.mogo.cloud.commons.utils.CoordinateUtils;
|
||||
@@ -32,6 +33,7 @@ import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.och.common.module.map.AmapNaviToDestinationModel;
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil;
|
||||
import com.mogo.och.common.module.utils.PinYinUtil;
|
||||
import com.mogo.och.taxi.passenger.bean.TaxiPassengerBaseRespBean;
|
||||
@@ -618,6 +620,29 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
mLocationsModels.clear();
|
||||
mLocationsModels.addAll(latLngModels);
|
||||
startOrStopRouteAndWipe(true);
|
||||
showRottingMapView();
|
||||
}
|
||||
|
||||
public void showRottingMapView(){
|
||||
AmapNaviToDestinationModel.getInstance(mContext).destroyAmaNavi();
|
||||
if (mAutopilotPlanningCallback != null){
|
||||
mAutopilotPlanningCallback.showRottingMapView();
|
||||
}
|
||||
}
|
||||
|
||||
public void startNaviByAmap() {
|
||||
if (mCurrentOCHOrder != null &&
|
||||
mCurrentOCHOrder.orderStatus == TaxiPassengerOrderStatusEnum.OnTheWayToEnd.getCode()){
|
||||
AmapNaviToDestinationModel.getInstance(mContext).destroyAmaNavi();
|
||||
|
||||
double orderEndStationLat = mCurrentOCHOrder.endSiteGcjPoint.get(1);
|
||||
double orderEndStationLng = mCurrentOCHOrder.endSiteGcjPoint.get(0);
|
||||
NaviLatLng startNaviLatLng = new NaviLatLng(mLatitude, mLongitude);
|
||||
NaviLatLng endNaviLatLng = new NaviLatLng(orderEndStationLat,orderEndStationLng);
|
||||
AmapNaviToDestinationModel.getInstance(mContext).initAMapNavi(startNaviLatLng, endNaviLatLng);
|
||||
AmapNaviToDestinationModel.getInstance(mContext).setVoiceIsMute(false);
|
||||
// AmapNaviToDestinationModel.getInstance(mContext).setOCHTaciNaviChangedCallback(this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -682,7 +707,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
|
||||
public void startOrStopQueryOrderRemaining(boolean isStart){
|
||||
if (isStart){
|
||||
TaxiPassengerModelLoopManager.getInstance().startQueryOrderRemainingtLoop();
|
||||
TaxiPassengerModelLoopManager.getInstance().startQueryOrderRemainingLoop();
|
||||
}else {
|
||||
TaxiPassengerModelLoopManager.getInstance().stopQueryOrderRemainingLoop();
|
||||
}
|
||||
@@ -835,7 +860,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
public void onSuccess(TaxiPassengerBaseRespBean data) {
|
||||
if (data != null && data.code == 0 && data.data.equals(true)) {
|
||||
updateAutopilotStatus(true);
|
||||
startOrStopReadyToAutopilotoop(false);
|
||||
startOrStopReadyToAutopilotLoop(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -856,11 +881,11 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
|
||||
public void startDriverReadyToAutopilotLoop(){
|
||||
if (NetworkUtils.isConnected(mContext)) {
|
||||
startOrStopReadyToAutopilotoop(true);
|
||||
startOrStopReadyToAutopilotLoop(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void startOrStopReadyToAutopilotoop(boolean isStart) {
|
||||
public void startOrStopReadyToAutopilotLoop(boolean isStart) {
|
||||
if (isStart){
|
||||
TaxiPassengerModelLoopManager.getInstance().startReadyToAutopilot();
|
||||
}else {
|
||||
|
||||
@@ -131,11 +131,11 @@ public class TaxiPassengerModelLoopManager {
|
||||
/**
|
||||
* 轮训查下 查询订单剩余里程和时间
|
||||
*/
|
||||
public void startQueryOrderRemainingtLoop() {
|
||||
public void startQueryOrderRemainingLoop() {
|
||||
if (mQueryOrderRemainingDisposable != null && !mQueryOrderRemainingDisposable.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
CallerLogger.INSTANCE.i(M_TAXI_P + TAG, "startQueryOrderRemainingtLoop()");
|
||||
CallerLogger.INSTANCE.i(M_TAXI_P + TAG, "startQueryOrderRemainingLoop()");
|
||||
mQueryOrderRemainingDisposable = Observable.interval(TaxiPassengerConst.LOOP_DELAY,
|
||||
TaxiPassengerConst.LOOP_CALCULATEROUTE_2S, TimeUnit.MILLISECONDS)
|
||||
.map((aLong -> aLong + 1))
|
||||
|
||||
@@ -166,7 +166,7 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
|
||||
});
|
||||
TaxiPassengerModel.getInstance().recoverNaviInfo();
|
||||
TaxiPassengerGeocodeSearchModel.getInstance(getContext()).destroyGeocodeSearch();
|
||||
TaxiPassengerModel.getInstance().startOrStopReadyToAutopilotoop(false);
|
||||
TaxiPassengerModel.getInstance().startOrStopReadyToAutopilotLoop(false);
|
||||
return;
|
||||
}
|
||||
// 20 司机到达上车点
|
||||
@@ -194,7 +194,7 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
|
||||
mView.showOrHideStartAutopilotView(false,false);
|
||||
mView.showOrHideServingOrderFragment(true,true);
|
||||
});
|
||||
TaxiPassengerModel.getInstance().startOrStopReadyToAutopilotoop(false);
|
||||
TaxiPassengerModel.getInstance().startOrStopReadyToAutopilotLoop(false);
|
||||
}
|
||||
// 30 用户到达上车点 并通过了手机号后四位验证
|
||||
// 40 服务中
|
||||
@@ -249,4 +249,8 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
|
||||
TaxiPassengerModel.getInstance().startAutopilot();
|
||||
}
|
||||
|
||||
public void startNaviByAmap(){
|
||||
TaxiPassengerModel.getInstance().startNaviByAmap();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -81,6 +81,11 @@ public class TaxiPassengerServingOrderPresenter extends Presenter<TaxiPassengerS
|
||||
runOnUIThread(() ->mView.routeResultByServer(models,haveArrivedIndex));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showRottingMapView() {
|
||||
runOnUIThread(() ->mView.showRottingMapView());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onCurrentOrderStatusChanged(TaxiPassengerOrderQueryRespBean.Result order) {
|
||||
|
||||
@@ -301,6 +301,8 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
.add(R.id.module_mogo_och_navi_panel_container, ochServingOrderFragment)
|
||||
.show(ochServingOrderFragment).commitAllowingStateLoss();
|
||||
|
||||
mPresenter.startNaviByAmap();
|
||||
|
||||
}else {
|
||||
if (ochServingOrderFragment != null){
|
||||
transaction
|
||||
|
||||
@@ -25,6 +25,8 @@ import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.common.module.map.AmapNaviToDestinationModel;
|
||||
import com.mogo.och.common.module.map.CommonAmapNaviVIew;
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil;
|
||||
import com.mogo.och.common.module.utils.NumberFormatUtil;
|
||||
import com.mogo.och.common.module.wigets.OCHGradientTextView;
|
||||
@@ -63,7 +65,9 @@ public class TaxiPassengerServingOrderFragment extends
|
||||
private TextView mTPOrderRemainArriveTime;
|
||||
private ImageView mMapArrowIcon;
|
||||
|
||||
private TaxiPassengerMapDirectionView mMapDirectionView;
|
||||
private TaxiPassengerMapDirectionView mMapRottingView;
|
||||
private CommonAmapNaviVIew mAmapNaviVIew;
|
||||
|
||||
private float lastBearing = 0;
|
||||
private RotateAnimation rotateAnimation;
|
||||
|
||||
@@ -130,9 +134,19 @@ public class TaxiPassengerServingOrderFragment extends
|
||||
@Override
|
||||
protected void initViews(Bundle savedInstanceState) {
|
||||
super.initViews(savedInstanceState);
|
||||
mMapDirectionView = mRootView.findViewById(R.id.taxi_p_order_map_view);
|
||||
mMapDirectionView.onCreateView(savedInstanceState);
|
||||
mMapDirectionView.setTaxiPassengerMapViewCallback(this);
|
||||
initRouteNaviView(savedInstanceState);
|
||||
initAmapNaviView(savedInstanceState);
|
||||
}
|
||||
|
||||
private void initAmapNaviView(Bundle savedInstanceState) {
|
||||
mAmapNaviVIew = mRootView.findViewById(R.id.taxi_p_order_amap_navi_view);
|
||||
mAmapNaviVIew.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
private void initRouteNaviView(Bundle savedInstanceState) {
|
||||
mMapRottingView = mRootView.findViewById(R.id.taxi_p_order_rotting_map_view);
|
||||
mMapRottingView.onCreateView(savedInstanceState);
|
||||
mMapRottingView.setTaxiPassengerMapViewCallback(this);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@@ -174,8 +188,11 @@ public class TaxiPassengerServingOrderFragment extends
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if (mMapDirectionView != null) {
|
||||
mMapDirectionView.onResume();
|
||||
if (mMapRottingView != null) {
|
||||
mMapRottingView.onResume();
|
||||
}
|
||||
if (mAmapNaviVIew != null){
|
||||
mAmapNaviVIew.onResume();
|
||||
}
|
||||
TaxiPassengerModel.getInstance().initGeocodeSearch();
|
||||
}
|
||||
@@ -196,29 +213,44 @@ public class TaxiPassengerServingOrderFragment extends
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
if (mMapDirectionView != null) {
|
||||
mMapDirectionView.onPause();
|
||||
if (mMapRottingView != null) {
|
||||
mMapRottingView.onPause();
|
||||
}
|
||||
if (mAmapNaviVIew != null){
|
||||
mAmapNaviVIew.onPause();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (mMapDirectionView != null) {
|
||||
mMapDirectionView.onDestroy();
|
||||
if (mMapRottingView != null) {
|
||||
mMapRottingView.onDestroy();
|
||||
}
|
||||
if (mAmapNaviVIew != null){
|
||||
mAmapNaviVIew.onDestroy();
|
||||
}
|
||||
AmapNaviToDestinationModel.getInstance(getContext()).destroyAmaNavi();
|
||||
TaxiPassengerModel.getInstance().destoryGeocodeSearch();
|
||||
}
|
||||
|
||||
public void showRottingMapView(){
|
||||
if (mAmapNaviVIew != null && mAmapNaviVIew.getVisibility() == View.VISIBLE){
|
||||
mAmapNaviVIew.setVisibility(View.GONE);
|
||||
}
|
||||
if (mMapRottingView != null && mMapRottingView.getVisibility() == View.GONE){
|
||||
mMapRottingView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
public void setLineMarker(List<LatLng> latLngList){
|
||||
if (latLngList.size() > 0) {
|
||||
if (mMapDirectionView != null) {
|
||||
mMapDirectionView.setCoordinatesLatLng(latLngList);
|
||||
if (mMapRottingView != null) {
|
||||
mMapRottingView.setCoordinatesLatLng(latLngList);
|
||||
UiThreadHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mMapDirectionView.setLineMarker();
|
||||
mMapRottingView.setLineMarker();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -236,22 +268,22 @@ public class TaxiPassengerServingOrderFragment extends
|
||||
}
|
||||
|
||||
public void drawablePolylineByServerRoute(List<LatLng> mCoordinatesLatLng,int haveArrivedIndex){
|
||||
if (mMapDirectionView != null){
|
||||
mMapDirectionView.setCoordinatesLatLng(mCoordinatesLatLng,haveArrivedIndex);
|
||||
if (mMapRottingView != null){
|
||||
mMapRottingView.setCoordinatesLatLng(mCoordinatesLatLng,haveArrivedIndex);
|
||||
UiThreadHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mMapDirectionView.drawablePolyline();
|
||||
mMapRottingView.drawablePolyline();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
private void clearPolyline() {
|
||||
if (mMapDirectionView != null) {
|
||||
if (mMapRottingView != null) {
|
||||
UiThreadHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mMapDirectionView.clearPolyline();
|
||||
mMapRottingView.clearPolyline();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -257,15 +257,30 @@
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.mogo.och.taxi.passenger.ui.TaxiPassengerMapDirectionView
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/taxi_p_order_map_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/taxi_p_order_map_height"
|
||||
android:background="@color/taxi_p_map_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/taxi_p_order_remain"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
app:layout_constraintLeft_toLeftOf="parent" >
|
||||
<com.mogo.och.taxi.passenger.ui.TaxiPassengerMapDirectionView
|
||||
android:id="@+id/taxi_p_order_rotting_map_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/taxi_p_order_map_height"
|
||||
android:visibility="gone"
|
||||
android:background="@color/taxi_p_map_bg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
<com.mogo.och.common.module.map.CommonAmapNaviVIew
|
||||
android:id="@+id/taxi_p_order_amap_navi_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/taxi_p_order_map_height"
|
||||
android:background="@color/taxi_p_map_bg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -1251,7 +1251,7 @@ public class TaxiModel {
|
||||
}
|
||||
if (null != routeList && routeList.getWayPointsList().size() > 0) {
|
||||
updateOrderRoute(routeList.getWayPointsList());
|
||||
setRouteLineMarker(routeList.getWayPointsList());
|
||||
// setRouteLineMarker(routeList.getWayPointsList());
|
||||
updateOrderRouteInfo(routeList.getWayPointsList());
|
||||
}
|
||||
}
|
||||
@@ -1260,11 +1260,11 @@ public class TaxiModel {
|
||||
|
||||
/**
|
||||
* 设置路径规划起终点
|
||||
* @param models
|
||||
* @param latLngModels
|
||||
*/
|
||||
private void setRouteLineMarker(List<MessagePad.Location> models) {
|
||||
List<LatLng> latLngModels = CoordinateCalculateRouteUtil
|
||||
.coordinateConverterWgsToGcjListCommon(mContext,models);
|
||||
public void setRouteLineMarker(List<LatLng> latLngModels) {
|
||||
// List<LatLng> latLngModels = CoordinateCalculateRouteUtil
|
||||
// .coordinateConverterWgsToGcjListCommon(mContext,models);
|
||||
if (mAutopilotPlanningCallback != null){
|
||||
mAutopilotPlanningCallback.setLineMarker(latLngModels);
|
||||
}
|
||||
@@ -1325,6 +1325,7 @@ public class TaxiModel {
|
||||
}
|
||||
mRoutePoints.addAll(CoordinateCalculateRouteUtil.coordinateConverterWgsToGcjListCommon(mContext, models));
|
||||
startDynamicCalculateRouteInfo();
|
||||
startNaviToEndStation(false);
|
||||
}
|
||||
|
||||
public void startDynamicCalculateRouteInfo() {
|
||||
@@ -1394,6 +1395,7 @@ public class TaxiModel {
|
||||
if (mAutopilotPlanningCallback != null){
|
||||
mAutopilotPlanningCallback.routeResult(mRoutePoints,haveArrivedIndex);
|
||||
}
|
||||
setRouteLineMarker(mRoutePoints);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1584,7 +1586,7 @@ public class TaxiModel {
|
||||
if (mOrderStatusCallback != null){
|
||||
mOrderStatusCallback.onNaviToEnd(false,isVoicePlay);
|
||||
}
|
||||
}else {//使用高的导航
|
||||
}else {//使用高德导航
|
||||
if (mOrderStatusCallback != null){
|
||||
mOrderStatusCallback.onNaviToEnd(true,isVoicePlay);
|
||||
}
|
||||
|
||||
@@ -43,9 +43,6 @@ public class NaviPresenter extends Presenter<TaxiRottingNaviFragment> implements
|
||||
@Override
|
||||
public void onDestroy( @NonNull LifecycleOwner owner ) {
|
||||
super.onDestroy( owner );
|
||||
|
||||
releaseListeners();
|
||||
TaxiModel.getInstance().release();
|
||||
}
|
||||
|
||||
private void initListeners() {
|
||||
@@ -69,7 +66,6 @@ public class NaviPresenter extends Presenter<TaxiRottingNaviFragment> implements
|
||||
|
||||
@Override
|
||||
public void setLineMarker(List<LatLng> models) {
|
||||
if (models == null) return;
|
||||
runOnUIThread(() -> mView.setLineMarker(models));
|
||||
}
|
||||
|
||||
|
||||
@@ -257,6 +257,7 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
|
||||
TaxiOrderStatusEnum.Cancel.getCode() == order.orderStatus ||
|
||||
TaxiOrderStatusEnum.JourneyCompleted.getCode() == order.orderStatus){
|
||||
TaxiModel.getInstance().startOrStopCalculateRouteInfo(false);
|
||||
TaxiModel.getInstance().setRouteLineMarker(null);
|
||||
}
|
||||
runOnUIThread(() -> mView.updateCurrentOrderStatusChanged(order));
|
||||
}
|
||||
|
||||
@@ -125,6 +125,8 @@ public class TaxiMapDirectionView
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.drawable.taxi_map_view_dir_start)));
|
||||
mEndMarker = mAMap.addMarker(new MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.drawable.taxi_map_view_dir_end)));
|
||||
mStartMarker.setVisible(false);
|
||||
mEndMarker.setVisible(false);
|
||||
|
||||
mArrivedRes = BitmapDescriptorFactory.fromResource(R.drawable.taxi_map_arrow_arrived);
|
||||
mUnArrivedRes = BitmapDescriptorFactory.fromResource(R.drawable.taxi_map_arrow_un_arrive);
|
||||
@@ -209,12 +211,17 @@ public class TaxiMapDirectionView
|
||||
|
||||
@Override
|
||||
public void setLineMarker() {
|
||||
if (mStartMarker != null) {
|
||||
mStartMarker.setVisible(false);
|
||||
}
|
||||
if (mEndMarker != null) {
|
||||
mEndMarker.setVisible(false);
|
||||
// if (mStartMarker != null) {
|
||||
// mStartMarker.setVisible(false);
|
||||
// }
|
||||
// if (mEndMarker != null) {
|
||||
// mEndMarker.setVisible(false);
|
||||
// }
|
||||
if (mStartMarker != null && mEndMarker != null
|
||||
&& mStartMarker.isVisible() && mEndMarker.isVisible()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mCoordinatesLatLng.size() > 2) {
|
||||
// 设置开始结束Marker位置
|
||||
LatLng startLatLng = mCoordinatesLatLng.get(0);
|
||||
@@ -245,7 +252,6 @@ public class TaxiMapDirectionView
|
||||
polylineOptions.lineCapType(PolylineOptions.LineCapType.LineCapRound);
|
||||
polylineOptions.setCustomTextureList(textureList);
|
||||
polylineOptions.setCustomTextureIndex(texIndexList);
|
||||
// polylineOptions.setCustomTexture(BitmapDescriptorFactory.fromResource(R.drawable.taxi_p_map_arrow_un_arrive));
|
||||
|
||||
// 绘制线
|
||||
mPolyline = mAMap.addPolyline(polylineOptions);
|
||||
@@ -301,7 +307,7 @@ public class TaxiMapDirectionView
|
||||
}
|
||||
}
|
||||
|
||||
public void resetPolyine() {
|
||||
public void resetPolyLine() {
|
||||
mCoordinatesLatLng.clear();
|
||||
if (mPolyline != null) {
|
||||
mPolyline.remove();
|
||||
|
||||
@@ -88,7 +88,7 @@ public class TaxiRottingNaviFragment extends MvpFragment<TaxiRottingNaviFragment
|
||||
}
|
||||
|
||||
public void setLineMarker(List<LatLng> latLngList){
|
||||
if (latLngList.size() > 0) {
|
||||
if (null != latLngList && latLngList.size() > 0) {
|
||||
if (mMapDirectionView != null) {
|
||||
mMapDirectionView.setCoordinatesLatLng(latLngList);
|
||||
UiThreadHandler.post(new Runnable() {
|
||||
|
||||
Reference in New Issue
Block a user