违章停车vr模式添加打点,自研2d模式图片显示太小

This commit is contained in:
liujing
2020-12-20 11:39:19 +08:00
parent 760e9ff4c3
commit f406171026
6 changed files with 51 additions and 26 deletions

View File

@@ -9,6 +9,7 @@ import com.mogo.map.MogoLatLng;
import com.mogo.map.location.MogoLocation;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.map.marker.IMogoMarkerManager;
import com.mogo.map.marker.MogoMarkerOptions;
import com.mogo.map.uicontroller.EnumMapUI;
import com.mogo.module.common.drawer.MarkerDrawer;
@@ -554,6 +555,7 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
mAlarmInfoMarker.setInfoWindowAdapter(new RoadConditionInfoWindow3DAdapter(markerShowEntity, AbsMogoApplication.getApp(), mAlarmInfoMarker.getMogoMarkerOptions()));
mAlarmInfoMarker.showInfoWindow();
} else {
IMogoMarkerManager i = V2XServiceManager.getMarkerManager();
mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
}
// 当前Marker设置为最上面

View File

@@ -4,12 +4,19 @@ import android.os.Handler;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.LinearInterpolator;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.IMogoMarkerManager;
import com.mogo.map.marker.MogoMarkerOptions;
import com.mogo.map.marker.anim.OnMarkerAnimationListener;
import com.mogo.module.common.drawer.MarkerDrawer;
import com.mogo.module.common.drawer.marker.RoadConditionInfoWindow3DAdapter;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerShowEntity;
import com.mogo.module.common.utils.CarSeries;
import com.mogo.module.service.ServiceConst;
import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.v2x.marker.V2XMarkerAdapter;
import com.mogo.module.v2x.scenario.view.IV2XMarker;
import com.mogo.module.v2x.utils.MarkerUtils;
import com.mogo.utils.WorkThreadHandler;
@@ -19,6 +26,7 @@ import java.util.ArrayList;
import java.util.List;
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
import static com.mogo.module.v2x.V2XConst.V2X_EVENT_ALARM_POI;
/**
* author : donghongyu
@@ -46,6 +54,14 @@ public class V2XIllegalParkMarker implements IV2XMarker<List<MarkerExploreWay>>
if (entityList != null) {
for (int i = 0; i < entityList.size(); i++) {
MarkerExploreWay markerExploreWay = entityList.get(i);
// 道路事件,或者水波纹扩散效果
MogoMarkerOptions optionsRipple = new MogoMarkerOptions()
.object(markerExploreWay)
.latitude(markerExploreWay.getLocation().getLat())
.longitude(markerExploreWay.getLocation().getLon());
optionsRipple.anchor(0.5f, 0.5f);
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
markerShowEntity.setBindObj(markerExploreWay);
markerShowEntity.setChecked(false);
@@ -54,7 +70,14 @@ public class V2XIllegalParkMarker implements IV2XMarker<List<MarkerExploreWay>>
markerShowEntity.setMarkerType(ServiceConst.CARD_TYPE_NOVELTY);
WorkThreadHandler.getInstance().postDelayed(() -> {
IMogoMarker mogoMarker = V2XServiceManager.getIMogoMarkerService().drawMarker(markerShowEntity);
IMogoMarker mogoMarker;
if (V2XServiceManager.getMoGoStatusManager().isVrMode()) {
mogoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl(markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_HIGH, null);
mogoMarker.setInfoWindowAdapter(new RoadConditionInfoWindow3DAdapter(markerShowEntity, AbsMogoApplication.getApp(), mogoMarker.getMogoMarkerOptions()));
mogoMarker.showInfoWindow();
} else {
mogoMarker = V2XServiceManager.getIMogoMarkerService().drawMarker(markerShowEntity);
}
// 点击监听,天际弹窗展示详情
if (mogoMarker != null) {
mogoMarker.startScaleAnimation(0, 1.2f, 0, 1.2f, 300, new AccelerateInterpolator(), new OnMarkerAnimationListener() {