Merge remote-tracking branch 'origin/dev2' into dev2
This commit is contained in:
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -89,7 +89,6 @@
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
<option name="useQualifiedModuleNames" value="true" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
@@ -5,9 +5,11 @@ import android.content.Context;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.och.IMogoOCH;
|
||||
import com.mogo.och.OCHConstants;
|
||||
import com.mogo.och.taxi.ui.OCHTaxiUiController;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
public
|
||||
@@ -26,6 +28,22 @@ class MogoOCHTaxi implements IMogoOCH {
|
||||
public void init( FragmentActivity activity, int containerId ) {
|
||||
MogoOCHTaxiModel.getInstance().init( activity.getApplicationContext() );
|
||||
OCHTaxiUiController.getInstance().init( activity, containerId );
|
||||
|
||||
UiThreadHandler.postDelayed( ()->{
|
||||
stepIntoVrMode();
|
||||
}, 5_000L );
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入鹰眼模式,设置手势缩放地图失效
|
||||
*/
|
||||
private void stepIntoVrMode(){
|
||||
Logger.d( TAG, "进入vr模式" );
|
||||
MogoApisHandler.getInstance()
|
||||
.getApis()
|
||||
.getMapServiceApi()
|
||||
.getMapUIController()
|
||||
.openVrMode(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -174,7 +174,7 @@ class MogoOCHTaxiModel {
|
||||
@Override
|
||||
public void onSuccess( OCHTaxiOrderResponse2 data ) {
|
||||
if ( data == null || data.result == null ) {
|
||||
TipToast.shortTip( "订单已取消或已完成" );
|
||||
Logger.d( TAG, "订单已取消或已完成" );
|
||||
clearCurrentOCHOrder();
|
||||
OCHTaxiUiController.getInstance().removeFragment();
|
||||
return;
|
||||
@@ -183,12 +183,12 @@ class MogoOCHTaxiModel {
|
||||
OCHOrderStatus status = OCHOrderStatus.valueOf( data.result.orderDispatchType );
|
||||
switch ( status ) {
|
||||
case Completed:
|
||||
TipToast.shortTip( "订单已完成" );
|
||||
TipToast.shortTip( mContext.getString( R.string.module_och_taxi_order_completed ) );
|
||||
clearCurrentOCHOrder();
|
||||
OCHTaxiUiController.getInstance().removeFragment();
|
||||
break;
|
||||
case Cancel:
|
||||
TipToast.shortTip( "订单已取消" );
|
||||
TipToast.shortTip( mContext.getString( R.string.module_och_taxi_order_cancel ) );
|
||||
clearCurrentOCHOrder();
|
||||
OCHTaxiUiController.getInstance().removeFragment();
|
||||
break;
|
||||
@@ -673,9 +673,8 @@ class MogoOCHTaxiModel {
|
||||
/**
|
||||
* 结束自动驾驶
|
||||
*/
|
||||
public void cancelAutopilot(){
|
||||
public void cancelAutopilot() {
|
||||
try {
|
||||
Logger.d( TAG, "结束自动驾驶" );
|
||||
MogoApisHandler.getInstance()
|
||||
.getApis()
|
||||
.getAdasControllerApi()
|
||||
|
||||
@@ -141,15 +141,15 @@ class OCHTaxiFragment extends BaseOchFragment< OCHTaxiView, OCHTaxiPresenter > i
|
||||
Logger.d( TAG, "已经达到终点" );
|
||||
slidePanelView.setVisibility( View.VISIBLE );
|
||||
slidePanelView.setText( getString( R.string.module_och_taxi_arrive_at_end_station ) );
|
||||
mOrderStatus.setText( "已到达乘客下车地点" );
|
||||
showNotice( "请携带好随身物品,注意侧后\n方来车,感谢体验蘑菇智行自\n动驾驶车!" );
|
||||
mOrderStatus.setText( R.string.module_och_taxi_arrive_at_end_station2 );
|
||||
showNotice( getString( R.string.module_och_taxi_order_complete) );
|
||||
} else if ( MogoOCHTaxiModel.getInstance().isOnTheWay2EndStation() ) {
|
||||
Logger.d( TAG, "已经去往终点" );
|
||||
slidePanelView.setVisibility( View.GONE );
|
||||
mOrderStatus.setText( "去往下车地点" );
|
||||
mOrderStatus.setText( R.string.module_och_taxi_on_the_way_2_end_station );
|
||||
} else if ( MogoOCHTaxiModel.getInstance().isArriveAtStartStation() ) {
|
||||
Logger.d( TAG, "已经达到起点" );
|
||||
mOrderStatus.setText( "已到达上车地点,等待乘客上车" );
|
||||
mOrderStatus.setText( R.string.module_och_taxi_waiting );
|
||||
if ( MogoOCHTaxiModel.getInstance().isUserArriveAtStartStation() ) {
|
||||
Logger.d( TAG, "乘客已上车" );
|
||||
if ( MogoApisHandler.getInstance().getApis().getAdasControllerApi().getAutopilotStatus() == IMogoAdasOCHCallback.STATUS_AUTOPILOT_ENABLE ) {
|
||||
@@ -162,7 +162,7 @@ class OCHTaxiFragment extends BaseOchFragment< OCHTaxiView, OCHTaxiPresenter > i
|
||||
} else if ( MogoOCHTaxiModel.getInstance().checkCurrentOCHOrder() ) {
|
||||
Logger.d( TAG, "去往上车站点" );
|
||||
slidePanelView.setVisibility( View.GONE );
|
||||
mOrderStatus.setText( "收到新订单,正在前往上车地点" );
|
||||
mOrderStatus.setText( R.string.module_och_taxi_new_order );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,28 +10,30 @@
|
||||
android:id="@+id/module_och_taxi_order_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="30px"
|
||||
android:layout_marginTop="24px"
|
||||
android:text="已到达上车站点,等待乘客上车"
|
||||
android:layout_marginLeft="@dimen/module_och_taxi_order_status_marginLeft"
|
||||
android:layout_marginTop="@dimen/module_och_taxi_order_status_marginTop"
|
||||
android:text="@string/module_och_taxi_order_status_ph_text"
|
||||
android:textColor="@color/module_och_order_status_textColor"
|
||||
android:textSize="24px"
|
||||
android:textSize="@dimen/module_och_taxi_order_status_textSize"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:id="@+id/module_och_taxi_order_status_divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginLeft="30px"
|
||||
android:layout_marginTop="23px"
|
||||
android:layout_marginRight="30px"
|
||||
android:background="#4D151B37" />
|
||||
android:layout_height="@dimen/module_och_taxi_order_status_divider_height"
|
||||
android:layout_marginLeft="@dimen/module_och_taxi_order_status_divider_marginLeft"
|
||||
android:layout_marginTop="@dimen/module_och_taxi_order_status_divider_marginTop"
|
||||
android:layout_marginRight="@dimen/module_och_taxi_order_status_divider_marginRight"
|
||||
android:background="@color/module_och_taxi_order_status_divider_bkgColor" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/module_och_taxi_order_status_stationInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="146px"
|
||||
android:paddingLeft="30px"
|
||||
android:paddingTop="23px"
|
||||
android:paddingRight="30px"
|
||||
android:paddingBottom="23px">
|
||||
android:layout_height="@dimen/module_och_taxi_order_status_stationInfo_height"
|
||||
android:paddingLeft="@dimen/module_och_taxi_order_status_stationInfo_paddingLeft"
|
||||
android:paddingTop="@dimen/module_och_taxi_order_status_stationInfo_paddingTop"
|
||||
android:paddingRight="@dimen/module_och_taxi_order_status_stationInfo_paddingRight"
|
||||
android:paddingBottom="@dimen/module_och_taxi_order_status_stationInfo_paddingBottom">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/greenDot"
|
||||
@@ -49,7 +51,7 @@
|
||||
android:layout_marginLeft="5px"
|
||||
android:text="后路站"
|
||||
android:textColor="@color/module_och_order_status_textColor"
|
||||
android:textSize="26px"
|
||||
android:textSize="@dimen/module_och_taxi_order_start_station_textSize"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toRightOf="@+id/greenDot"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -59,8 +61,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="上车站点"
|
||||
android:textColor="#8198E8"
|
||||
android:textSize="20px"
|
||||
android:textColor="@color/module_och_taxi_order_start_station_anchor_textColor"
|
||||
android:textSize="@dimen/module_och_taxi_order_start_station_anchor_textSize"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_och_taxi_order_start_station"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -90,7 +92,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="后路站1"
|
||||
android:textColor="@color/module_och_order_status_textColor"
|
||||
android:textSize="26px"
|
||||
android:textSize="@dimen/module_och_taxi_order_start_station_textSize"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/module_och_taxi_order_start_station"
|
||||
@@ -102,8 +104,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="下车站点"
|
||||
android:textColor="#8198E8"
|
||||
android:textSize="20px"
|
||||
android:textColor="@color/module_och_taxi_order_end_station_anchor_textColor"
|
||||
android:textSize="@dimen/module_och_taxi_order_end_station_anchor_textSize"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_och_taxi_order_end_station"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -112,10 +114,11 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/module_och_taxi_order_distance_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80px"
|
||||
android:layout_marginLeft="3px"
|
||||
android:layout_marginRight="3px"
|
||||
android:layout_height="@dimen/module_och_taxi_order_distance_container_height"
|
||||
android:layout_marginLeft="@dimen/module_och_taxi_order_distance_container_marginLeft"
|
||||
android:layout_marginRight="@dimen/module_och_taxi_order_distance_container_marginLeft"
|
||||
android:background="@drawable/module_och_taxi_panel_distance_bkg">
|
||||
|
||||
<TextView
|
||||
@@ -123,10 +126,10 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="27px"
|
||||
android:text="预计里程"
|
||||
android:textColor="#8198E8"
|
||||
android:textSize="20px"
|
||||
android:layout_marginLeft="@dimen/module_och_taxi_order_distance_anchor_marginLeft"
|
||||
android:text="@string/module_och_taxi_order_distance_anchor_text"
|
||||
android:textColor="@color/module_och_taxi_order_distance_anchor_textColor"
|
||||
android:textSize="@dimen/module_och_taxi_order_distance_anchor_textSize"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/greenDot" />
|
||||
|
||||
@@ -135,10 +138,10 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|right"
|
||||
android:layout_marginRight="27px"
|
||||
android:text="3.2 km"
|
||||
android:textColor="#1FA7FF"
|
||||
android:textSize="28px"
|
||||
android:layout_marginRight="@dimen/module_och_taxi_order_distance_marginRight"
|
||||
android:text="@string/module_och_taxi_order_distance_text_ph"
|
||||
android:textColor="@color/module_och_taxi_order_distance_textColor"
|
||||
android:textSize="@dimen/module_och_taxi_order_distance_textSize"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/greenDot" />
|
||||
|
||||
@@ -2,4 +2,25 @@
|
||||
<resources>
|
||||
<dimen name="module_och_taxi_panel_width">464px</dimen>
|
||||
<dimen name="module_och_taxi_panel_height">310px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_marginLeft">30px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_marginTop">24px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_textSize">24px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_divider_height">1px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_divider_marginLeft">30px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_divider_marginTop">23px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_divider_marginRight">30px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_stationInfo_height">146px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_stationInfo_paddingLeft">30px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_stationInfo_paddingTop">23px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_stationInfo_paddingRight">30px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_stationInfo_paddingBottom">23px</dimen>
|
||||
<dimen name="module_och_taxi_order_start_station_textSize">26px</dimen>
|
||||
<dimen name="module_och_taxi_order_start_station_anchor_textSize">20px</dimen>
|
||||
<dimen name="module_och_taxi_order_end_station_anchor_textSize">20px</dimen>
|
||||
<dimen name="module_och_taxi_order_distance_container_height">80px</dimen>
|
||||
<dimen name="module_och_taxi_order_distance_container_marginLeft">3px</dimen>
|
||||
<dimen name="module_och_taxi_order_distance_anchor_marginLeft">27px</dimen>
|
||||
<dimen name="module_och_taxi_order_distance_anchor_textSize">20px</dimen>
|
||||
<dimen name="module_och_taxi_order_distance_textSize">28px</dimen>
|
||||
<dimen name="module_och_taxi_order_distance_marginRight">27px</dimen>
|
||||
</resources>
|
||||
@@ -1,4 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="module_och_order_status_textColor">#FFFFFF</color>
|
||||
<color name="module_och_taxi_order_status_divider_bkgColor">#4D151B37</color>
|
||||
<color name="module_och_taxi_order_start_station_anchor_textColor">#8198E8</color>
|
||||
<color name="module_och_taxi_order_end_station_anchor_textColor">#8198E8</color>
|
||||
<color name="module_och_taxi_order_distance_anchor_textColor">#8198E8</color>
|
||||
<color name="module_och_taxi_order_distance_textColor">#1FA7FF</color>
|
||||
</resources>
|
||||
26
OCH/mogo-och-taxi/src/main/res/values/dimens.xml
Normal file
26
OCH/mogo-och-taxi/src/main/res/values/dimens.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_och_taxi_panel_width">464px</dimen>
|
||||
<dimen name="module_och_taxi_panel_height">310px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_marginLeft">30px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_marginTop">24px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_textSize">24px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_divider_height">1px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_divider_marginLeft">30px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_divider_marginTop">23px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_divider_marginRight">30px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_stationInfo_height">146px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_stationInfo_paddingLeft">30px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_stationInfo_paddingTop">23px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_stationInfo_paddingRight">30px</dimen>
|
||||
<dimen name="module_och_taxi_order_status_stationInfo_paddingBottom">23px</dimen>
|
||||
<dimen name="module_och_taxi_order_start_station_textSize">26px</dimen>
|
||||
<dimen name="module_och_taxi_order_start_station_anchor_textSize">20px</dimen>
|
||||
<dimen name="module_och_taxi_order_end_station_anchor_textSize">20px</dimen>
|
||||
<dimen name="module_och_taxi_order_distance_container_height">80px</dimen>
|
||||
<dimen name="module_och_taxi_order_distance_container_marginLeft">3px</dimen>
|
||||
<dimen name="module_och_taxi_order_distance_anchor_marginLeft">27px</dimen>
|
||||
<dimen name="module_och_taxi_order_distance_anchor_textSize">20px</dimen>
|
||||
<dimen name="module_och_taxi_order_distance_textSize">28px</dimen>
|
||||
<dimen name="module_och_taxi_order_distance_marginRight">27px</dimen>
|
||||
</resources>
|
||||
@@ -2,4 +2,14 @@
|
||||
<resources>
|
||||
<string name="module_och_taxi_arrive_at_start_station">乘客已上车,准备出发</string>
|
||||
<string name="module_och_taxi_arrive_at_end_station">到达站点,乘客已下车</string>
|
||||
<string name="module_och_taxi_order_status_ph_text">已到达上车站点,等待乘客上车</string>
|
||||
<string name="module_och_taxi_order_distance_anchor_text">预计里程</string>
|
||||
<string name="module_och_taxi_order_distance_text_ph">3.2 km</string>
|
||||
<string name="module_och_taxi_order_complete">请携带好随身物品,注意侧后\n方来车,感谢体验蘑菇智行自\n动驾驶车!</string>
|
||||
<string name="module_och_taxi_on_the_way_2_end_station">去往下车地点</string>
|
||||
<string name="module_och_taxi_waiting">已到达上车地点,等待乘客上车</string>
|
||||
<string name="module_och_taxi_new_order">收到新订单,正在前往上车地点</string>
|
||||
<string name="module_och_taxi_arrive_at_end_station2">已到达乘客下车地点</string>
|
||||
<string name="module_och_taxi_order_completed">订单已完成</string>
|
||||
<string name="module_och_taxi_order_cancel">订单已取消</string>
|
||||
</resources>
|
||||
@@ -17,6 +17,8 @@ import com.mogo.och.view.SlidePanelView;
|
||||
import com.mogo.service.adas.IMogoAdasOCHCallback;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
/**
|
||||
* 网约车基础Fragment,主要负责布局通用界面,处理站点面板和通话面板互斥情况
|
||||
@@ -26,6 +28,9 @@ import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> extends MvpFragment<V, P> {
|
||||
|
||||
private static final String TAG = "BaseOchFragment";
|
||||
|
||||
protected SlidePanelView slidePanelView;
|
||||
private View tvNoticeContainer;
|
||||
private TextView tvNotice;
|
||||
@@ -81,7 +86,6 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> e
|
||||
findViewById(R.id.btnAutopilotRunning).setOnClickListener(view -> MogoApisHandler.getInstance().getApis().getAdasControllerApi().mockOchStatus(IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING, "Running"));
|
||||
|
||||
findViewById(R.id.btnAutopilotArrive).setOnClickListener(view -> MogoApisHandler.getInstance().getApis().getAdasControllerApi().mockOchStatus(-1, "Running"));
|
||||
|
||||
}
|
||||
|
||||
private void checkCallView(boolean isShown) {
|
||||
|
||||
@@ -1000,4 +1000,14 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
Logger.d( "ADASCOOR", "使用rtk定位数据%s", GsonUtil.jsonFromObject( bean ) );
|
||||
mMapView.getLocationClient().updateRTKAutoPilotLocation( bean );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openVrMode( boolean zoomGestureEnable ) {
|
||||
try {
|
||||
mMapView.getMapAutoViewHelper().setZoomGesturesEnabled( zoomGestureEnable );
|
||||
mMapView.getMapAutoViewHelper().setMapStyle( MapAutoApi.MAP_STYLE_VR );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,9 +36,9 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
|
||||
public static AMapUIController getInstance() {
|
||||
if (sInstance == null) {
|
||||
synchronized (AMapUIController.class) {
|
||||
if (sInstance == null) {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( AMapUIController.class ) {
|
||||
if ( sInstance == null ) {
|
||||
sInstance = new AMapUIController();
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public void initClient(IMogoMapUIController client) {
|
||||
public void initClient( IMogoMapUIController client ) {
|
||||
this.mClient = client;
|
||||
}
|
||||
|
||||
@@ -55,46 +55,46 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrafficEnabled(boolean visible) {
|
||||
if (mClient != null) {
|
||||
mClient.setTrafficEnabled(visible);
|
||||
public void setTrafficEnabled( boolean visible ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.setTrafficEnabled( visible );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapControlResult changeZoom( boolean zoom) {
|
||||
if (mClient != null) {
|
||||
return mClient.changeZoom(zoom);
|
||||
public MapControlResult changeZoom( boolean zoom ) {
|
||||
if ( mClient != null ) {
|
||||
return mClient.changeZoom( zoom );
|
||||
}
|
||||
return MapControlResult.ERROR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapControlResult changeZoom(float zoom) {
|
||||
if (mClient != null) {
|
||||
return mClient.changeZoom(zoom);
|
||||
public MapControlResult changeZoom( float zoom ) {
|
||||
if ( mClient != null ) {
|
||||
return mClient.changeZoom( zoom );
|
||||
}
|
||||
return MapControlResult.ERROR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeMapMode(EnumMapUI mode) {
|
||||
if (mClient != null) {
|
||||
mClient.changeMapMode(mode);
|
||||
public void changeMapMode( EnumMapUI mode ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.changeMapMode( mode );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void moveToCenter(MogoLatLng latLng, boolean animate) {
|
||||
if (mClient != null) {
|
||||
mClient.moveToCenter(latLng, animate);
|
||||
public void moveToCenter( MogoLatLng latLng, boolean animate ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.moveToCenter( latLng, animate );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showMyLocation(boolean visible) {
|
||||
if (mClient != null) {
|
||||
mClient.showMyLocation(visible);
|
||||
public void showMyLocation( boolean visible ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.showMyLocation( visible );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
|
||||
@Override
|
||||
public void recoverLockMode() {
|
||||
if (mClient != null) {
|
||||
if ( mClient != null ) {
|
||||
mClient.recoverLockMode();
|
||||
}
|
||||
}
|
||||
@@ -120,22 +120,22 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLockZoom(int var1) {
|
||||
if (mClient != null) {
|
||||
mClient.setLockZoom(var1);
|
||||
public void setLockZoom( int var1 ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.setLockZoom( var1 );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayOverview( Rect bounds ) {
|
||||
if (mClient != null) {
|
||||
mClient.displayOverview(bounds);
|
||||
if ( mClient != null ) {
|
||||
mClient.displayOverview( bounds );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getScalePerPixel() {
|
||||
if (mClient != null) {
|
||||
if ( mClient != null ) {
|
||||
return mClient.getScalePerPixel();
|
||||
}
|
||||
return 0;
|
||||
@@ -143,7 +143,7 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
|
||||
@Override
|
||||
public float getZoomLevel() {
|
||||
if (mClient != null) {
|
||||
if ( mClient != null ) {
|
||||
return mClient.getZoomLevel();
|
||||
}
|
||||
return 0;
|
||||
@@ -151,7 +151,7 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
|
||||
@Override
|
||||
public MogoLatLng getCameraNorthEastPosition() {
|
||||
if (mClient != null) {
|
||||
if ( mClient != null ) {
|
||||
return mClient.getCameraNorthEastPosition();
|
||||
}
|
||||
return null;
|
||||
@@ -159,54 +159,55 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
|
||||
@Override
|
||||
public MogoLatLng getCameraSouthWestPosition() {
|
||||
if (mClient != null) {
|
||||
if ( mClient != null ) {
|
||||
return mClient.getCameraSouthWestPosition();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public MogoLatLng getWindowCenterLocation() {
|
||||
if (mClient != null) {
|
||||
@Override
|
||||
public MogoLatLng getWindowCenterLocation() {
|
||||
if ( mClient != null ) {
|
||||
return mClient.getWindowCenterLocation();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointToCenter(double mapCenterX, double mapCenterY) {
|
||||
if (mClient != null) {
|
||||
mClient.setPointToCenter(mapCenterX, mapCenterY);
|
||||
public void setPointToCenter( double mapCenterX, double mapCenterY ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.setPointToCenter( mapCenterX, mapCenterY );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Point getLocationPointInScreen(MogoLatLng latLng) {
|
||||
if (mClient != null) {
|
||||
return mClient.getLocationPointInScreen(latLng);
|
||||
public Point getLocationPointInScreen( MogoLatLng latLng ) {
|
||||
if ( mClient != null ) {
|
||||
return mClient.getLocationPointInScreen( latLng );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoLatLng getLocationMogoLatLngInScreen(Point point) {
|
||||
if (mClient != null) {
|
||||
return mClient.getLocationMogoLatLngInScreen(point);
|
||||
public MogoLatLng getLocationMogoLatLngInScreen( Point point ) {
|
||||
if ( mClient != null ) {
|
||||
return mClient.getLocationMogoLatLngInScreen( point );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startJumpAnimation(IMogoMarker marker, float high, Interpolator interpolator,
|
||||
long duration) {
|
||||
if (mClient != null) {
|
||||
mClient.startJumpAnimation(marker, high, interpolator, duration);
|
||||
public void startJumpAnimation( IMogoMarker marker, float high, Interpolator interpolator,
|
||||
long duration ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.startJumpAnimation( marker, high, interpolator, duration );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRenderFps(int fps) {
|
||||
if (mClient != null) {
|
||||
mClient.setRenderFps(fps);
|
||||
public void setRenderFps( int fps ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.setRenderFps( fps );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,7 +220,7 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
|
||||
@Override
|
||||
public void forceRender() {
|
||||
if (mClient != null) {
|
||||
if ( mClient != null ) {
|
||||
mClient.forceRender();
|
||||
}
|
||||
}
|
||||
@@ -305,4 +306,11 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
mClient.syncLocation2Map( data );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openVrMode( boolean zoomGestureEnable ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.openVrMode( zoomGestureEnable );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,11 +253,25 @@ public interface IMogoMapUIController {
|
||||
|
||||
}
|
||||
|
||||
default void destroy(){
|
||||
default void destroy() {
|
||||
|
||||
}
|
||||
|
||||
default void syncLocation2Map( JSONObject data ){
|
||||
/**
|
||||
* 使用自动驾驶车的定位数据
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
default void syncLocation2Map( JSONObject data ) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开鹰眼模式
|
||||
*
|
||||
* @param zoomGestureEnable 是否支持手势缩放改变地图样式
|
||||
*/
|
||||
default void openVrMode( boolean zoomGestureEnable ) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,4 +345,12 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
mDelegate = MogoMapDelegateFactory.getMapUIControllerDelegate();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openVrMode( boolean zoomGestureEnable ) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.openVrMode( zoomGestureEnable );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -535,6 +535,13 @@ public class MockIntentHandler implements IntentHandler {
|
||||
.getAdasControllerApi()
|
||||
.aiCloudToAdasData( parameters );
|
||||
break;
|
||||
case 45:
|
||||
MogoApisHandler.getInstance()
|
||||
.getApis()
|
||||
.getMapServiceApi()
|
||||
.getMapUIController()
|
||||
.openVrMode( false );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user