[Add]增加自车位置切换功能DebugSettingView
Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
4
.idea/misc.xml
generated
4
.idea/misc.xml
generated
@@ -16,12 +16,14 @@
|
||||
<entry key="OCH/mogo-och-bus/src/main/res/layout/fragment_och_bus.xml" value="0.1010068539349746" />
|
||||
<entry key="OCH/mogo-och/src/main/res/drawable/module_mogo_och_autopilot_status_bg.xml" value="0.19479166666666667" />
|
||||
<entry key="OCH/mogo-och/src/main/res/layout/module_mogo_och_base_fragment.xml" value="0.1953125" />
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml" value="0.1" />
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml" value="1.0729233277594363" />
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/notification_v2x_msg_vr.xml" value="0.18996305418719212" />
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_autopilot_status.xml" value="0.18996305418719212" />
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_check_status.xml" value="0.18996305418719212" />
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml" value="0.3953125" />
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_traffic_light_vr.xml" value="0.18996305418719212" />
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_vip_identification.xml" value="0.45" />
|
||||
<entry key="core/function-impl/mogo-core-function-map/src/main/res/layout/function_map_fragment_hd_map.xml" value="0.29322916666666665" />
|
||||
<entry key="foudations/mogo-commons/src/main/res/layout/module_commons_layout_toast.xml" value="0.3117283950617284" />
|
||||
<entry key="modules/mogo-module-authorize/src/main/res/layout/module_authorize_fragment.xml" value="0.273046875" />
|
||||
<entry key="modules/mogo-module-carchatting/src/main/res/drawable/module_carchatting_vr_calling_bg.xml" value="0.231875" />
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerHDMapManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
|
||||
@@ -207,6 +208,19 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
// 切换地图中心点视角
|
||||
tbChangeCarCenter100.setOnClickListener {
|
||||
CallerHDMapManager.changeMaoViewAngle(1)
|
||||
}
|
||||
tbChangeCarQuarter100.setOnClickListener {
|
||||
CallerHDMapManager.changeMaoViewAngle(2)
|
||||
}
|
||||
tbChangeCarTwoFifths100.setOnClickListener {
|
||||
CallerHDMapManager.changeMaoViewAngle(3)
|
||||
}
|
||||
tbChangeCarTwoFifths80.setOnClickListener {
|
||||
CallerHDMapManager.changeMaoViewAngle(4)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -81,6 +81,42 @@
|
||||
android:textOn="显示「车辆检测」"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/tbChangeCarCenter100"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:text="切换 CAR_CENTER_100"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/tbChangeCarQuarter100"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:text="切换 CAR_QUARTER_100"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/tbChangeCarTwoFifths100"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:text="切换 CAR_TWO_FIFTHS_100"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/tbChangeCarTwoFifths80"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:text="切换 CAR_TWO_FIFTHS_80"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
|
||||
</com.google.android.flexbox.FlexboxLayout>
|
||||
|
||||
<!--地图呈现数据源控制-->
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.mogo.eagle.core.function.api.map.hd
|
||||
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
|
||||
|
||||
/**
|
||||
* @author donghongyu
|
||||
* @date 12/10/20 1:36 PM
|
||||
* 地图层控制
|
||||
*/
|
||||
interface IMoGoMapFragmentProvider : IMoGoFunctionServerProvider {
|
||||
/**
|
||||
* 修改地图中心点
|
||||
* MapAutoApi.CAR_CENTER_100 1/4
|
||||
* MapAutoApi.CAR_CENTER_100 2/5
|
||||
* MapAutoApi.CAR_CENTER_100 80米
|
||||
* MapAutoApi.CAR_CENTER_100 2/5
|
||||
*/
|
||||
fun changeMaoViewAngle(type: Int)
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.mogo.eagle.core.function.call.map
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
|
||||
import com.mogo.eagle.core.function.api.map.hd.IMoGoMapFragmentProvider
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/9/17 6:15 下午
|
||||
* 高精度地图控制
|
||||
*/
|
||||
object CallerHDMapManager : CallerBase() {
|
||||
private val mapProviderApi: IMoGoMapFragmentProvider
|
||||
get() = ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_MAP)
|
||||
.navigation() as IMoGoMapFragmentProvider;
|
||||
|
||||
/**
|
||||
* 修改地图中心点
|
||||
* MapAutoApi.CAR_CENTER_100 1/4
|
||||
* MapAutoApi.CAR_CENTER_100 2/5
|
||||
* MapAutoApi.CAR_CENTER_100 80米
|
||||
* MapAutoApi.CAR_CENTER_100 2/5
|
||||
*/
|
||||
fun changeMaoViewAngle(type: Int) {
|
||||
mapProviderApi.changeMaoViewAngle(type)
|
||||
}
|
||||
}
|
||||
@@ -79,7 +79,7 @@ MOGO_TRAFFICLIVE_VERSION=1.1.54-live
|
||||
MOGO_LOCATION_VERSION=1.1.54-live
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=V2.0.0.6
|
||||
MAP_SDK_VERSION=V2.0.0.6-test
|
||||
# websocket
|
||||
WEBSOCKET_VERSION=1.1.7
|
||||
## 产品库必备配置,产品库自动对versionCode和versionName版本进行升级
|
||||
|
||||
@@ -720,6 +720,13 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeMapViewAngle(int type) {
|
||||
if (checkAMapView()) {
|
||||
mMapView.getMapAutoViewHelper().testMapViewAngle(type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getTileId(double lon, double lat) {
|
||||
return getMap().getUIController().getTileId(lon, lat);
|
||||
|
||||
@@ -294,6 +294,13 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeMapViewAngle(int type) {
|
||||
if (mClient != null) {
|
||||
mClient.changeMapViewAngle(type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getTileId(double lon, double lat) {
|
||||
return MapAutoApi.INSTANCE.getTileID(lon, lat, 13); // 13为默认获取瓦片层级级别
|
||||
|
||||
@@ -236,6 +236,15 @@ public interface IMogoMapUIController {
|
||||
*/
|
||||
void changeBearing(float bearing);
|
||||
|
||||
/**
|
||||
* 修改地图中心
|
||||
* MapAutoApi.CAR_CENTER_100 1/4
|
||||
* MapAutoApi.CAR_CENTER_100 2/5
|
||||
* MapAutoApi.CAR_CENTER_100 80米
|
||||
* MapAutoApi.CAR_CENTER_100 2/5
|
||||
*/
|
||||
void changeMapViewAngle(int type);
|
||||
|
||||
/**
|
||||
* 获取瓦片id
|
||||
*
|
||||
@@ -248,12 +257,13 @@ public interface IMogoMapUIController {
|
||||
|
||||
/**
|
||||
* 获取限速
|
||||
*
|
||||
* @param lon
|
||||
* @param lat
|
||||
* @param angle
|
||||
* @return
|
||||
*/
|
||||
int getSpeedLimmit(double lon,double lat,float angle);
|
||||
int getSpeedLimmit(double lon, double lat, float angle);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -337,6 +337,14 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeMapViewAngle(int type) {
|
||||
initDelegate();
|
||||
if (mDelegate != null) {
|
||||
mDelegate.changeMapViewAngle(type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getTileId(double lon, double lat) {
|
||||
return mDelegate.getTileId(lon, lat);
|
||||
|
||||
@@ -9,6 +9,7 @@ import androidx.annotation.Nullable;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths;
|
||||
import com.mogo.eagle.core.function.api.map.hd.IMoGoMapFragmentProvider;
|
||||
import com.mogo.map.IMogoMap;
|
||||
import com.mogo.map.IMogoUiSettings;
|
||||
import com.mogo.map.MogoMapView;
|
||||
@@ -26,7 +27,8 @@ import com.mogo.utils.logger.Logger;
|
||||
* 地图图层,地图操作都在这个图层完成
|
||||
*/
|
||||
@Route(path = MoGoFragmentPaths.PATH_FRAGMENT_MAP)
|
||||
public class MapFragment extends MvpFragment< MapView, MapPresenter > implements MapView, IMogoMapFrameController {
|
||||
public class MapFragment extends MvpFragment< MapView, MapPresenter >
|
||||
implements MapView, IMogoMapFrameController, IMoGoMapFragmentProvider {
|
||||
|
||||
private static final String TAG = "MapFragment";
|
||||
|
||||
@@ -203,4 +205,15 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > implements
|
||||
destroy();
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String getFunctionName() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeMaoViewAngle(int type) {
|
||||
mMogoMapView.getMap().getUIController().changeMapViewAngle(type);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user