8.0.17 视角变换
This commit is contained in:
@@ -551,6 +551,10 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
dismissToolsFloatView()
|
||||
}
|
||||
|
||||
override fun changeMapDAngle(mode: Int) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
private fun showCameraList(cameraList: List<CameraEntity>?) {
|
||||
context?.let {
|
||||
if (cameraViewFloat == null) {
|
||||
|
||||
@@ -96,7 +96,6 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tbSpeedView.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
if (!isChecked) {
|
||||
CallerHmiManager.setSpeedChartViewVisibility(View.VISIBLE)
|
||||
@@ -129,6 +128,11 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
changesight_top_btn.setOnClickListener {
|
||||
CallerHDMapManager.setMapDAngle(0);
|
||||
}
|
||||
|
||||
|
||||
tvObuInfo.text = CallerObuListenerManager.getObuStatusInfoJsonString()
|
||||
tvAutopilotInfo.text =
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString()
|
||||
|
||||
@@ -101,6 +101,57 @@
|
||||
android:textOn="显示「小地图」"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbChangeSight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:textOff="隐藏「视角切换工具」"
|
||||
android:textOn="显示「视角切换工具」"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/changesight_top_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:text="切换 顶视角"
|
||||
android:textSize="@dimen/dp_34"/>
|
||||
<Button
|
||||
android:id="@+id/changesight_back_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:text="切换 后方来车视角"
|
||||
android:textSize="@dimen/dp_34"/>
|
||||
<Button
|
||||
android:id="@+id/changesight_cross_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:text="切换 十字路口视角"
|
||||
android:textSize="@dimen/dp_34"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/changesight_far_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:text="切换 远视角"
|
||||
android:textSize="@dimen/dp_34"/>
|
||||
<Button
|
||||
android:id="@+id/reset_changesight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:text="恢复视角"
|
||||
android:textSize="@dimen/dp_34"/>
|
||||
<!-- <Button
|
||||
android:id="@+id/tbChangeCarCenter100"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -23,4 +23,9 @@ interface IMoGoMapFragmentProvider : IMoGoFunctionServerProvider {
|
||||
* 传入资源ID
|
||||
*/
|
||||
fun changeCurrentIcon(@RawRes iconId: Int)
|
||||
|
||||
/**
|
||||
* 设置地图视线角度
|
||||
*/
|
||||
fun setMapDAngle(mode: Int)
|
||||
}
|
||||
@@ -35,4 +35,8 @@ object CallerHDMapManager : CallerBase() {
|
||||
fun changeCurrentIcon(@RawRes iconId: Int){
|
||||
mapProviderApi.changeCurrentIcon(iconId)
|
||||
}
|
||||
|
||||
fun setMapDAngle(mode: Int) {
|
||||
mapProviderApi.setMapDAngle(mode)
|
||||
}
|
||||
}
|
||||
@@ -1218,4 +1218,9 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
ResIdCache.putVal(speedVal, val);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMapDAngle(float angle) {
|
||||
mMapView.getMapAutoViewHelper().setMapDAngle(angle);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -344,4 +344,9 @@ public interface IMogoMapUIController {
|
||||
default void setMarkerInfoResName(String speedVal, String val) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置地图视线角度
|
||||
*/
|
||||
void setMapDAngle(float angle);
|
||||
}
|
||||
|
||||
@@ -221,4 +221,41 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter >
|
||||
public void changeCurrentIcon(int iconId) {
|
||||
mMogoMapView.getMap().getUIController().changeCurrentIcon(iconId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* sight mode
|
||||
* @param mode
|
||||
*/
|
||||
|
||||
public static final int SIGHT_MODE_NORMAL = 0;
|
||||
public static final int SIGHT_MODE_TOP = 1;
|
||||
public static final int SIGHT_MODE_BACK = 2;
|
||||
public static final int SIGHT_MODE_CROSS = 3;
|
||||
public static final int SIGHT_MODE_FAR = 4;
|
||||
@Override
|
||||
public void setMapDAngle(int mode) {
|
||||
float angle = getSightModeAngle(mode);
|
||||
mMogoMapView.getMap().getUIController().setMapDAngle(angle);
|
||||
}
|
||||
|
||||
private float getSightModeAngle(int mode) {
|
||||
float angle = 0.0f;
|
||||
switch (mode){
|
||||
case SIGHT_MODE_NORMAL:
|
||||
angle = 16.5f;
|
||||
case SIGHT_MODE_TOP:
|
||||
angle = 16.5f;
|
||||
case SIGHT_MODE_BACK:
|
||||
angle = 16.5f;
|
||||
case SIGHT_MODE_CROSS:
|
||||
angle = 16.5f;
|
||||
case SIGHT_MODE_FAR:
|
||||
angle = 16.5f;
|
||||
}
|
||||
return angle;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user