Merge remote-tracking branch 'origin/dev2_aiSdk' into dev2_aiSdk

This commit is contained in:
董宏宇
2021-05-13 16:06:29 +08:00
13 changed files with 45 additions and 12 deletions

View File

@@ -423,9 +423,6 @@ public class AMapViewWrapper implements IMogoMapView,
@Override
public void moveToCenter(MogoLatLng latLng, boolean animate) {
if (mCurrentUI == EnumMapUI.Type_VR) {
return;
}
Logger.d(TAG, "move to center %s", latLng);
if (latLng == null || latLng.lat == 0.0d || latLng.lng == 0.0d) {
Logger.e(TAG, "latlng = null or is illegal");

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="26px" />
<solid android:color="@color/module_switch_map_bg" />
</shape>

View File

@@ -48,13 +48,14 @@
<!--切换地图远近事件-->
<FrameLayout
android:id="@+id/module_switch_model_layout"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"
android:layout_width="@dimen/dp_108"
android:layout_height="@dimen/dp_108"
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"
android:visibility="visible"
android:background="@drawable/module_switch_map_bg"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
@@ -62,8 +63,8 @@
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" />
android:layout_gravity="center"
android:src="@drawable/module_switch_map_angle" />
</FrameLayout>
<androidx.constraintlayout.widget.ConstraintLayout

View File

@@ -14,4 +14,5 @@
<color name="arc_speeding">#DB3137</color>
<color name="arc_speed">#3E77F6</color>
<color name="module_switch_map_bg">#3B4577</color>
</resources>

View File

@@ -15,6 +15,7 @@ import com.mogo.map.marker.IMogoMarker
import com.mogo.map.marker.IMogoMarkerClickListener
import com.mogo.map.marker.MogoMarkerOptions
import com.mogo.map.search.geo.MogoPoiItem
import com.mogo.module.common.MogoApisHandler
import com.mogo.module.common.map.MapCenterPointStrategy
import com.mogo.module.common.map.Scene
import com.mogo.module.common.utils.CarSeries
@@ -188,7 +189,7 @@ class CategorySearchFragment : BaseFragment(), CategoryView, IMogoVoiceCmdCallBa
current.setToTop()
arrayList[mAdapter.lastPosition].icon(getMarkerIcon(mAdapter.lastPosition))
arrayList[mAdapter.current].icon(getMarkerIcon(mAdapter.current))
if (moveToCenter) {
if (moveToCenter && !MogoApisHandler.getInstance().apis.statusManagerApi.isVrMode) {
SearchApisHolder.getStatusManager().setUserInteractionStatus(TAG, true, false)
SearchApisHolder.getUiControllerApis().moveToCenter(current.position, CarSeries.isF8xxSeries())
}

View File

@@ -338,7 +338,9 @@ public class MockIntentHandler implements IntentHandler {
MarkerServiceHandler.getApis().getRefreshStrategyControllerApi().restartAutoRefreshAtTime(duration);
IMogoMarker marker = MarkerServiceHandler.getMarkerManager().addMarker(TAG, options);
MarkerServiceHandler.getMogoStatusManager().setUserInteractionStatus(TAG, true, false);
MarkerServiceHandler.getMapUIController().moveToCenter(mogoLatLngs.get(0));
if(!MarkerServiceHandler.getApis().getStatusManagerApi().isVrMode()){
MarkerServiceHandler.getMapUIController().moveToCenter(mogoLatLngs.get(0));
}
WorkThreadHandler.getInstance().post(() -> marker.startSmooth(mogoLatLngs, duration));
break;
}

View File

@@ -170,7 +170,9 @@ class OnlineCarSearchIntentHandler implements IntentHandler {
int radius ) {
MarkerServiceHandler.getApis().getRefreshStrategyControllerApi().restartAutoRefreshAtTime( 30_000 );
MarkerServiceHandler.getMogoStatusManager().setUserInteractionStatus( TAG, true, false );
MarkerServiceHandler.getMapUIController().moveToCenter( target );
if(!MarkerServiceHandler.getApis().getStatusManagerApi().isVrMode()){
MarkerServiceHandler.getMapUIController().moveToCenter( target );
}
MapMarkerManager.getInstance().getOnlineCarDataByVoiceControl(
target,
onlyFocus,

View File

@@ -498,7 +498,9 @@ public class TanluManager implements IMogoMarkerClickListener,
Logger.d(TAG, "moveToMarcker lat = " + lat + " >>>>lon = " + lon);
MogoLatLng latLng = new MogoLatLng(lat, lon);
mMogoStatusManager.setUserInteractionStatus(TAG, true, false);
mMApUIController.moveToCenter(latLng);
if(!mMogoStatusManager.isVrMode()){
mMApUIController.moveToCenter(latLng);
}
}
private void moveNotFresh() {

View File

@@ -13,6 +13,7 @@ import com.mogo.commons.voice.AIAssist;
import com.mogo.map.location.MogoLocation;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.map.uicontroller.VisualAngleMode;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.module.common.entity.V2XPushMessageEntity;
@@ -85,9 +86,22 @@ public class V2XVoiceCallLiveBiz implements IMogoMarkerClickListener{
MogoApisHandler.getInstance().getApis().getRegisterCenterApi().registerMogoStaticMarkerClickListener(MAP_STATIC, this);
}
/**
* 地图上静态marker点击现在仅点击摄像头
* @param marker
* @return
*/
@Override
public boolean onStaticMarkerClicked(IMogoMarker marker) {
Log.d(REGISTER_LIFECYCLE_TAG,"onStaticMarkerClicked marker");
if(V2XServiceManager.getMapService().getMapUIController().getCurrentMapVisualAngle().isLongSight()){
Log.d(REGISTER_LIFECYCLE_TAG,"onStaticMarkerClicked marker is on LongSight, so don't response");
return false;
}
//拉近地图视角为近景
V2XServiceManager.getMapService().getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_CLOSE_SIGHT);
//移动地图中心点至marker位置
V2XServiceManager.getMapService().getMapUIController().moveToCenter(marker.getPosition(),true);
String assInfo = marker.getMarkerAssInfo();
Log.d(REGISTER_LIFECYCLE_TAG,"onStaticMarkerClicked marker assInfo : " + assInfo);
if (TextUtils.isEmpty(assInfo) || !assInfo.contains(MAP_STATIC_TRAFFIC)) {
@@ -161,6 +175,10 @@ public class V2XVoiceCallLiveBiz implements IMogoMarkerClickListener{
});
}
/**
* 获取特定路口摄像头直播
* @param assInfo 路口摄像头Id
*/
private void getSpecifiedOpenCameraLive(String assInfo) {
MoGoAiCloudTrafficLive.viewDesignativeIntersectionLive(assInfo, new ITrafficIntersectionLiveCallBack() {
@Override