diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCardResult.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCardResult.java index d90490c832..d147275d40 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCardResult.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCardResult.java @@ -11,6 +11,7 @@ public class MarkerCardResult implements Serializable { private List exploreWay; private List onlineCar; private List shareMusic; + private List noveltyInfo; public List getCarChat() { return carChat; @@ -44,6 +45,14 @@ public class MarkerCardResult implements Serializable { this.shareMusic = shareMusic; } + public List getNoveltyInfo() { + return noveltyInfo; + } + + public void setNoveltyInfo(List noveltyInfo) { + this.noveltyInfo = noveltyInfo; + } + @Override public String toString() { return "MarkerCardResult{" + @@ -51,6 +60,7 @@ public class MarkerCardResult implements Serializable { ", exploreWay=" + exploreWay + ", onlineCar=" + onlineCar + ", shareMusic=" + shareMusic + + ", noveltyInfo=" + noveltyInfo + '}'; } } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerNoveltyInfo.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerNoveltyInfo.java new file mode 100644 index 0000000000..ccf609d422 --- /dev/null +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerNoveltyInfo.java @@ -0,0 +1,110 @@ + +package com.mogo.module.common.entity; + +public class MarkerNoveltyInfo { + + private ContentData contentData; + private MarkerLocation location; + private String poiType; + private String type; + private MarkerUserInfo userInfo; + + public ContentData getContentData() { + return contentData; + } + + public void setContentData(ContentData contentData) { + this.contentData = contentData; + } + + public MarkerLocation getLocation() { + return location; + } + + public void setLocation(MarkerLocation location) { + this.location = location; + } + + public String getPoiType() { + return poiType; + } + + public void setPoiType(String poiType) { + this.poiType = poiType; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public MarkerUserInfo getUserInfo() { + return userInfo; + } + + public void setUserInfo(MarkerUserInfo userInfo) { + this.userInfo = userInfo; + } + + public class ContentData { + + private String content; + private String iconUrl; + private String imgUrl; + private String infoId; + private Long likeNum; + private String title; + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getIconUrl() { + return iconUrl; + } + + public void setIconUrl(String iconUrl) { + this.iconUrl = iconUrl; + } + + public String getImgUrl() { + return imgUrl; + } + + public void setImgUrl(String imgUrl) { + this.imgUrl = imgUrl; + } + + public String getInfoId() { + return infoId; + } + + public void setInfoId(String infoId) { + this.infoId = infoId; + } + + public Long getLikeNum() { + return likeNum; + } + + public void setLikeNum(Long likeNum) { + this.likeNum = likeNum; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + } +} diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java index 7e5865a6fc..ad9f7d9c6c 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java @@ -14,6 +14,7 @@ import com.mogo.module.common.entity.MarkerCarChat; import com.mogo.module.common.entity.MarkerCardResult; import com.mogo.module.common.entity.MarkerExploreWay; import com.mogo.module.common.entity.MarkerLocation; +import com.mogo.module.common.entity.MarkerNoveltyInfo; import com.mogo.module.common.entity.MarkerOnlineCar; import com.mogo.module.common.entity.MarkerResponse; import com.mogo.module.common.entity.MarkerShareMusic; @@ -207,13 +208,14 @@ public class MarkerServiceHandler { if (response != null && response.getResult() != null) { MarkerCardResult markerCardResult = response.getResult(); - List carChat = markerCardResult.getCarChat(); - List onlineCar = markerCardResult.getOnlineCar(); - List exploreWay = markerCardResult.getExploreWay(); - List shareMusic = markerCardResult.getShareMusic(); + List carChatList = markerCardResult.getCarChat(); + List onlineCarList = markerCardResult.getOnlineCar(); + List exploreWayList = markerCardResult.getExploreWay(); + List shareMusicList = markerCardResult.getShareMusic(); + List noveltyInfoList = markerCardResult.getNoveltyInfo(); - if (carChat != null) { - for (MarkerCarChat markerCarChat : carChat) { + if (carChatList != null) { + for (MarkerCarChat markerCarChat : carChatList) { MarkerLocation markerLocation = markerCarChat.getLocation(); MarkerShowEntity markerShowEntity = new MarkerShowEntity(); @@ -227,8 +229,8 @@ public class MarkerServiceHandler { } } - if (onlineCar != null) { - for (MarkerOnlineCar markerOnlineCar : onlineCar) { + if (onlineCarList != null) { + for (MarkerOnlineCar markerOnlineCar : onlineCarList) { MarkerLocation markerLocation = markerOnlineCar.getLocation(); MarkerShowEntity markerShowEntity = new MarkerShowEntity(); @@ -242,8 +244,8 @@ public class MarkerServiceHandler { } } - if (exploreWay != null) { - for (MarkerExploreWay markerExploreWay : exploreWay) { + if (exploreWayList != null) { + for (MarkerExploreWay markerExploreWay : exploreWayList) { if (!markerExploreWay.getCanLive()) { MarkerLocation markerLocation = markerExploreWay.getLocation(); @@ -258,8 +260,8 @@ public class MarkerServiceHandler { } } - if (shareMusic != null) { - for (MarkerShareMusic markerShareMusic : shareMusic) { + if (shareMusicList != null) { + for (MarkerShareMusic markerShareMusic : shareMusicList) { MarkerLocation markerLocation = markerShareMusic.getLocation(); MarkerShowEntity markerShowEntity = new MarkerShowEntity(); @@ -273,6 +275,20 @@ public class MarkerServiceHandler { } } + if (noveltyInfoList != null) { + for (MarkerNoveltyInfo noveltyInfo : noveltyInfoList) { + MarkerLocation markerLocation = noveltyInfo.getLocation(); + + MarkerShowEntity markerShowEntity = new MarkerShowEntity(); + markerShowEntity.setBindObj(noveltyInfo); + markerShowEntity.setMarkerLocation(markerLocation); + markerShowEntity.setMarkerType(noveltyInfo.getType()); + markerShowEntity.setTextContent(noveltyInfo.getLocation().getAddress()); + + drawMapMarker(markerShowEntity); + } + } + } getMapUIController().changeZoom(12); } diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerInfoView.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerInfoView.java index d3951cd95d..f5ceb0b08a 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerInfoView.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerInfoView.java @@ -95,9 +95,9 @@ public class MapMarkerInfoView extends MapMarkerBaseView { ivUserHead.setVisibility(View.GONE); ivIcon.setVisibility(View.VISIBLE); - ivIcon.setImageResource(R.drawable.icon_map_marker_road_block_up); - clMarkerContent.setBackgroundResource(R.drawable.bg_map_marker_blue_info); - ivReverseTriangle.setImageResource(R.drawable.bg_shape_reverse_triangle_blue); + ivIcon.setImageResource(R.drawable.icon_map_marker_road_check); + clMarkerContent.setBackgroundResource(R.drawable.bg_map_marker_green_info); + ivReverseTriangle.setImageResource(R.drawable.bg_shape_reverse_triangle_green); ivCar.setImageResource(R.drawable.icon_map_marker_location_blue); break; case ServiceConst.CARD_TYPE_SHARE_MUSIC: diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerView.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerView.java index 1f4f1ea9d5..d835e32a80 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerView.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerView.java @@ -92,8 +92,8 @@ public class MapMarkerView extends MapMarkerBaseView { ivUserHead.setVisibility(View.GONE); ivIcon.setVisibility(View.VISIBLE); - ivIcon.setImageResource(R.drawable.icon_map_marker_road_block_up); - ivBg.setImageResource(R.drawable.bg_map_marker_blue); + ivIcon.setImageResource(R.drawable.icon_map_marker_road_check); + ivBg.setImageResource(R.drawable.bg_map_marker_green); ivCar.setImageResource(R.drawable.icon_map_marker_location_blue); break; case ServiceConst.CARD_TYPE_SHARE_MUSIC: