Merge remote-tracking branch 'origin/dev2_aiSdk' into dev2_aiSdk
This commit is contained in:
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -91,6 +91,7 @@
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
<option name="useQualifiedModuleNames" value="true" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
@@ -46,6 +46,16 @@ public interface IMogoMarkerManager {
|
||||
*/
|
||||
void removeMarkers();
|
||||
|
||||
/**
|
||||
* 显示地图上添加的所有markers
|
||||
*/
|
||||
void visibleAllMarkers();
|
||||
|
||||
/**
|
||||
* 隐藏地图上添加的所有markers
|
||||
*/
|
||||
void inVisibleAllMarkers();
|
||||
|
||||
/**
|
||||
* 获取某种类型的全部marker。
|
||||
*
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.mogo.map.marker;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.listener.IMogoMapListenerRegister;
|
||||
|
||||
@@ -43,6 +47,20 @@ public class MogoMarkersHandler implements IMogoMarkerClickListener, IMogoMarker
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public synchronized void visibleAll(){
|
||||
mServicesMarkers.values().stream()
|
||||
.filter(mogoMarkerList -> mogoMarkerList != null && !mogoMarkerList.isEmpty())
|
||||
.forEach(mogoMarkerList -> mogoMarkerList.forEach(mogoMarker -> mogoMarker.setVisible(true)));
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public synchronized void inVisibleAll(){
|
||||
mServicesMarkers.values().stream()
|
||||
.filter(mogoMarkerList -> mogoMarkerList != null && !mogoMarkerList.isEmpty())
|
||||
.forEach(mogoMarkerList -> mogoMarkerList.forEach(mogoMarker -> mogoMarker.setVisible(false)));
|
||||
}
|
||||
|
||||
public synchronized void removeAll() {
|
||||
final Collection< List< IMogoMarker > > mogoMarkers = mServicesMarkers.values();
|
||||
for ( List< IMogoMarker > mogoMarkerList : mogoMarkers ) {
|
||||
|
||||
@@ -98,4 +98,14 @@ public class MogoMarkerManager implements IMogoMarkerManager {
|
||||
public void removeRouteWayOverlay() {
|
||||
// RouteOverlayHelper.getInstance().removeAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visibleAllMarkers() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inVisibleAllMarkers() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ import com.mogo.map.navi.MogoTraffic;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
import com.mogo.module.common.ModuleNames;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.dialog.WMDialog;
|
||||
import com.mogo.module.common.glide.SkinAbleBitmapTarget;
|
||||
@@ -180,6 +181,9 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
private boolean isShowGuide;
|
||||
|
||||
private ImageView mSwitchMapModeImage;
|
||||
private FrameLayout mSwitchMapModeLayout;
|
||||
|
||||
/**
|
||||
* 搜索莫模块
|
||||
*/
|
||||
@@ -205,7 +209,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 内部变量标识是否在vrMode,用于方法执行过滤,避免重复或异常调用
|
||||
*/
|
||||
@@ -369,6 +372,11 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
tvYellow = (TextView) findViewById(R.id.tv_yellow);
|
||||
tvRed = (TextView) findViewById(R.id.tv_red);
|
||||
tvGreen = (TextView) findViewById(R.id.tv_green);
|
||||
|
||||
mSwitchMapModeLayout = (FrameLayout) findViewById(R.id.module_switch_model_layout);
|
||||
mSwitchMapModeImage = (ImageView) findViewById(R.id.module_switch_model_icon);
|
||||
mSwitchMapModeImage.setOnClickListener(clickListener);
|
||||
|
||||
}
|
||||
|
||||
private int debugPanelClickCount = 0;
|
||||
@@ -400,6 +408,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
localIsVrMode = true;
|
||||
flSpeed.setVisibility(View.VISIBLE);
|
||||
mSwitchMapModeLayout.setVisibility(View.VISIBLE);
|
||||
// clTrafficLight.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
@@ -427,6 +436,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
MogoApisHandler.getInstance().getApis().getRegisterCenterApi().unregisterMogoLocationListener(TAG);
|
||||
localIsVrMode = false;
|
||||
flSpeed.setVisibility(View.GONE);
|
||||
mSwitchMapModeLayout.setVisibility(View.GONE);
|
||||
clTrafficLight.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
@@ -1085,7 +1095,13 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
@Override
|
||||
public void onMapVisualAngleChanged(VisualAngleMode visualAngleMode) {
|
||||
//todo visual
|
||||
if (visualAngleMode.isMediumSight()) {
|
||||
mSwitchMapModeLayout.setVisibility(View.VISIBLE);
|
||||
} else if (visualAngleMode.isLongSight()) {
|
||||
mSwitchMapModeLayout.setVisibility(View.VISIBLE);
|
||||
} else if (visualAngleMode.isCloseSight()) {
|
||||
mSwitchMapModeLayout.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private static final int SEEK_HELP_NOTICE_NUM_MSG_TYPE = 401015;
|
||||
@@ -1329,11 +1345,22 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
// show panel
|
||||
debugPanelGroup.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
} else if (v.getId() == R.id.module_switch_model_icon) { //切换地图的远近视图
|
||||
if (MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().getCurrentMapVisualAngle().isLongSight()) {
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(AbsMogoApplication.getApp()).visibleAllMarkers();
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi()
|
||||
.getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT);
|
||||
} else if (MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(AbsMogoApplication.getApp()).inVisibleAllMarkers();
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi()
|
||||
.getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@Override
|
||||
public void onCarLocationChanged2(Location location) {
|
||||
vrModeNavInfoView.refreshCurrentSpeed((int) (location.getSpeed() * 3.6F));
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
|
||||
<include
|
||||
layout="@layout/module_ext_layout_extensions"
|
||||
android:layout_width="match_parent"
|
||||
@@ -44,6 +42,28 @@
|
||||
android:layout_width="@dimen/dp_200"
|
||||
android:layout_height="@dimen/dp_200"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<!--切换地图远近事件-->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_switch_model_layout"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_switch_model_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/module_ext_display_overview_icon_marginTop"
|
||||
android:src="@drawable/model_ext_default_user_head" />
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@@ -16,7 +16,6 @@ import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.entity.net.V2XOptimalRouteDataRes;
|
||||
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes;
|
||||
import com.mogo.module.v2x.scenario.impl.V2XScenarioManager;
|
||||
import com.mogo.module.v2x.scenario.scene.livecar.V2XVoiceCallLiveBiz;
|
||||
import com.mogo.module.v2x.utils.TestOnLineCarUtils;
|
||||
import com.mogo.module.v2x.utils.V2XSQLiteUtils;
|
||||
@@ -161,6 +160,7 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);
|
||||
} else if (sceneType == 18) { //test visualAngle UI
|
||||
V2XServiceManager.getMapService().getMarkerManager(mContext).inVisibleAllMarkers();
|
||||
V2XServiceManager.getMapService().getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT);
|
||||
} else if (sceneType == 19) { //test visualAngle UI
|
||||
V2XServiceManager.getMapService().getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT);
|
||||
|
||||
Reference in New Issue
Block a user