add new func of clicking static marker should visual change ,plus move to marker position

This commit is contained in:
zhongchao
2021-05-13 15:32:47 +08:00
parent 41fed0e1ec
commit be30ac60a3
6 changed files with 29 additions and 7 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");

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