退出导航功能调整
This commit is contained in:
@@ -23,6 +23,7 @@ import com.amap.api.maps.model.animation.TranslateAnimation;
|
||||
import com.amap.api.navi.AMapNaviView;
|
||||
import com.amap.api.navi.AMapNaviViewListener;
|
||||
import com.amap.api.navi.AMapNaviViewOptions;
|
||||
import com.amap.api.navi.enums.AimLessMode;
|
||||
import com.amap.api.navi.model.NaviInfo;
|
||||
import com.mogo.map.IMogoMap;
|
||||
import com.mogo.map.IMogoMapView;
|
||||
@@ -423,11 +424,11 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
|
||||
style.myLocationType(MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
|
||||
style.interval(1000);
|
||||
style.anchor(0.5F,0.5F);
|
||||
style.strokeColor(Color.TRANSPARENT);
|
||||
style.strokeWidth(0);
|
||||
style.myLocationIcon(
|
||||
BitmapDescriptorFactory.fromResource(R.drawable.map_api_ic_current_location));
|
||||
//style.anchor(0.5F,0.5F);
|
||||
//style.strokeColor(Color.TRANSPARENT);
|
||||
//style.strokeWidth(0);
|
||||
//style.myLocationIcon(
|
||||
// BitmapDescriptorFactory.fromResource(R.drawable.map_api_ic_current_location));
|
||||
mMapView.getMap().setMyLocationStyle(style);
|
||||
}
|
||||
}
|
||||
@@ -463,6 +464,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
if (checkAMapView()) {
|
||||
mMapView.setCarOverlayVisible(true);
|
||||
showMyLocation( false );
|
||||
NaviClient.getInstance(getContext()).stopAimlessMode();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -471,6 +473,8 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
if (checkAMapView()) {
|
||||
mMapView.setCarOverlayVisible(false);
|
||||
showMyLocation(true);
|
||||
NaviClient.getInstance(getContext()).startAimlessMode(AimLessMode.CAMERA_AND_SPECIALROAD_DETECTED);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -233,4 +233,13 @@ public class NaviClient implements IMogoNavi {
|
||||
mAMapNaviListener.handleClickedPolyline( polyline );
|
||||
}
|
||||
}
|
||||
|
||||
public void startAimlessMode(int cameraAndSpecialroadDetected) {
|
||||
mAMapNavi.startAimlessMode(cameraAndSpecialroadDetected);
|
||||
}
|
||||
|
||||
public void stopAimlessMode() {
|
||||
mAMapNavi.stopAimlessMode();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,12 +134,12 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
mExitNavi = findViewById( R.id.module_entrance_id_exit_navi );
|
||||
mExitNavi.setOnClickListener( view -> {
|
||||
if ( mMogoNavi != null ) {
|
||||
if ( mIsLock ) {
|
||||
//if ( mIsLock ) {
|
||||
NaviNoticeDialog naviNoticeDialog = new NaviNoticeDialog( getContext() );
|
||||
naviNoticeDialog.show();
|
||||
} else {
|
||||
mMApUIController.recoverLockMode();
|
||||
}
|
||||
//} else {
|
||||
// mMApUIController.recoverLockMode();
|
||||
//}
|
||||
}
|
||||
} );
|
||||
|
||||
@@ -251,7 +251,7 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
if ( isLock ) {
|
||||
mExitNavi.setText( R.string.module_ext_str_exit_navi );
|
||||
} else {
|
||||
mExitNavi.setText( R.string.module_ext_str_exit_path );
|
||||
mExitNavi.setText( R.string.module_ext_str_exit_navi );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user