Merge branch 'mk' into dev_merge_shunyi_vr_map

This commit is contained in:
liujing
2020-12-20 11:39:40 +08:00
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() {

View File

@@ -18,8 +18,8 @@
"location":{
"address":"北三环麻家什字",
"angle":0,
"lat":39.968598,
"lon":116.411121
"lat":39.969057,
"lon":116.417831
},
"generateTime":0,
"distance":0,

View File

@@ -14,11 +14,11 @@
"zoom": true,
"zoomScale": 15,
"location": {
"lat":39.969088,
"lon":116.41808
"lat":39.968738,
"lon":116.411288
},
"lat":39.969088,
"lon":116.41808,
"lat":39.968738,
"lon":116.411288,
"userHead": "https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/5.png",
"msgImgUrl": "https://upload.jianshu.io/users/upload_avatars/7663825/7c28763e-002b-4e89-8dea-5b8da210ef2c.jpg"
}

View File

@@ -5,8 +5,8 @@
"location":{
"address":"北三环环球贸易中心",
"angle":270,
"lat":39.969088,
"lon":116.41808
"lat":39.969057,
"lon":116.417831
},
"noveltyInfo":{
"addr":"北三环环球贸易中心",
@@ -27,8 +27,8 @@
"location":{
"address":"北三环环球贸易中心",
"angle":270,
"lat":39.969088,
"lon":116.41808
"lat":39.969057,
"lon":116.417831
},
"poiType":"10003",
"type":"CARD_TYPE_ROAD_CONDITION",

View File

@@ -1,20 +1,20 @@
{
"coordinates":[
"coordinates": [
{
"createTime":1593678359872,
"distance":1100,
"lat":39.969088,
"lon":116.41808,
"sn":"ZD801B1932L00041",
"targetId":20007,
"targetName":"故障车",
"userInfo":{
"age":33,
"displayName":"小叮当",
"headImgUrl":"http://img.zhidaohulian.com/fileServer/api/qa/user_info/1243669495923/7c476a0515aa51ae355d10d7f21c898e.jpg",
"sex":1,
"sn":"ZD801B1932L00041",
"userId":1243669495923
"createTime": 1593678359872,
"distance": 1100,
"lat":39.969057,
"lon":116.417831,
"sn": "ZD801B1932L00041",
"targetId": 20007,
"targetName": "故障车",
"userInfo": {
"age": 33,
"displayName": "小叮当",
"headImgUrl": "http://img.zhidaohulian.com/fileServer/api/qa/user_info/1243669495923/7c476a0515aa51ae355d10d7f21c898e.jpg",
"sex": 1,
"sn": "ZD801B1932L00041",
"userId": 1243669495923
}
}
]