From ebd698bb646b0e8411319fa1158c0d9af1f0ed12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Mon, 13 Jan 2020 18:09:58 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E6=8E=A5=E5=8F=A3=E7=9A=84=E5=BC=82=E5=B8=B8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mogo/module/service/network/RefreshBody.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshBody.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshBody.java index 11f0d33453..2200ed394a 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshBody.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshBody.java @@ -11,7 +11,7 @@ import java.util.List; */ public class RefreshBody { -// public List< String > dataType = new ArrayList<>(); + public List< String > dataType = new ArrayList<>(); public int limit = 50;// 请求数量 public int radius = 2_000; // 地理围栏半径(米) public LatLon location; From 77481c7ed92be50f232338903b5308860b85c3a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Mon, 13 Jan 2020 19:17:47 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=BA=86marker=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/utils/network/utils/GsonUtil.java | 2 ++ .../module/common/entity/MarkerLocation.java | 6 +++--- .../module/common/entity/MarkerResponse.java | 6 +++--- .../module/service/MarkerServiceHandler.java | 20 ++++++++++--------- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/foudations/mogo-utils/src/main/java/com/mogo/utils/network/utils/GsonUtil.java b/foudations/mogo-utils/src/main/java/com/mogo/utils/network/utils/GsonUtil.java index ea1cfad71d..540458dde6 100644 --- a/foudations/mogo-utils/src/main/java/com/mogo/utils/network/utils/GsonUtil.java +++ b/foudations/mogo-utils/src/main/java/com/mogo/utils/network/utils/GsonUtil.java @@ -36,6 +36,7 @@ public class GsonUtil { try { return getGson().toJson(object); } catch ( Exception var2) { + var2.printStackTrace(); return null; } } @@ -48,6 +49,7 @@ public class GsonUtil { try { return getGson().fromJson(json, klass); } catch ( Exception var3) { + var3.printStackTrace(); return null; } } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerLocation.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerLocation.java index 519b644e0d..38715c15aa 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerLocation.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerLocation.java @@ -8,7 +8,7 @@ import java.io.Serializable; public class MarkerLocation implements Serializable { private String address; - private Long angle; + private float angle; private Double lat; private Double lon; @@ -20,11 +20,11 @@ public class MarkerLocation implements Serializable { this.address = address; } - public Long getAngle() { + public float getAngle() { return angle; } - public void setAngle(Long angle) { + public void setAngle(float angle) { this.angle = angle; } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerResponse.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerResponse.java index 70a07e68cb..7fc61bb9e3 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerResponse.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerResponse.java @@ -7,16 +7,16 @@ import java.io.Serializable; @SuppressWarnings("unused") public class MarkerResponse implements Serializable { - private Long code; + private int code; private String msg; private MarkerCardResult result; private String sign; - public Long getCode() { + public int getCode() { return code; } - public void setCode(Long code) { + public void setCode(int code) { this.code = code; } 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 d992f31ca6..dbddc85b19 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 @@ -74,7 +74,7 @@ public class MarkerServiceHandler { @Override public void onMsgReceived(MarkerResponse response) { - Logger.e(TAG, "===" + response); + Logger.e(TAG, "======MarkerResponse:" + response); if (!getMogoStatusManager().isSearchUIShow()) { drawMapMarker(response); } @@ -201,16 +201,18 @@ public class MarkerServiceHandler { if (exploreWay != null) { for (MarkerExploreWay markerExploreWay : exploreWay) { - MarkerLocation markerLocation = markerExploreWay.getLocation(); + if (!markerExploreWay.getCanLive()) { + MarkerLocation markerLocation = markerExploreWay.getLocation(); - MarkerShowEntity markerShowEntity = new MarkerShowEntity(); - markerShowEntity.setBindObj(markerExploreWay); - markerShowEntity.setMarkerLocation(markerLocation); - markerShowEntity.setMarkerType(markerExploreWay.getType()); - markerShowEntity.setTextContent(markerExploreWay.getUserInfo().getUserName()); - markerShowEntity.setIconUrl(markerExploreWay.getUserInfo().getUserHead()); + MarkerShowEntity markerShowEntity = new MarkerShowEntity(); + markerShowEntity.setBindObj(markerExploreWay); + markerShowEntity.setMarkerLocation(markerLocation); + markerShowEntity.setMarkerType(markerExploreWay.getType()); + markerShowEntity.setTextContent(markerExploreWay.getUserInfo().getUserName()); + markerShowEntity.setIconUrl(markerExploreWay.getUserInfo().getUserHead()); - drawMapMarker(markerShowEntity); + drawMapMarker(markerShowEntity); + } } } From b64197643eda1ec0ed61197b99e51017a98e5cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Mon, 13 Jan 2020 19:32:37 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=BA=86marker=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mogo/module/service/MarkerServiceHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 dbddc85b19..2e67e2e710 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 @@ -208,7 +208,7 @@ public class MarkerServiceHandler { markerShowEntity.setBindObj(markerExploreWay); markerShowEntity.setMarkerLocation(markerLocation); markerShowEntity.setMarkerType(markerExploreWay.getType()); - markerShowEntity.setTextContent(markerExploreWay.getUserInfo().getUserName()); + markerShowEntity.setTextContent(markerExploreWay.getAddr()); markerShowEntity.setIconUrl(markerExploreWay.getUserInfo().getUserHead()); drawMapMarker(markerShowEntity); From ee2b4991b5ca3152f7bdc07d7acacf8c641ebfad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Mon, 13 Jan 2020 20:44:46 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BC=95=E8=B5=B7=E7=9A=84marker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/common/entity/MarkerCarChat.java | 2 +- .../common/entity/MarkerDynamicData.java | 10 +-- .../common/entity/MarkerExploreWay.java | 32 +++++----- .../common/entity/MarkerHobbyDatum.java | 1 - .../module/common/entity/MarkerLocation.java | 62 +++++++++---------- .../module/common/entity/MarkerOnlineCar.java | 22 +++---- .../common/entity/MarkerShareMusic.java | 35 ++++++----- .../common/entity/MarkerShowEntity.java | 3 - .../module/common/entity/MarkerUserInfo.java | 12 ++-- .../module/service/MarkerServiceHandler.java | 56 +++++++++-------- .../service/marker/MapMarkerInfoView.java | 2 +- .../module/service/marker/MapMarkerView.java | 2 +- .../tanlu/fragment/TanluCardViewFragment.java | 12 ++-- .../com/mogo/module/tanlu/util/Utils.java | 2 +- 14 files changed, 127 insertions(+), 126 deletions(-) diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCarChat.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCarChat.java index 63a2838939..8a87118e91 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCarChat.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCarChat.java @@ -7,8 +7,8 @@ import java.io.Serializable; @SuppressWarnings("unused") public class MarkerCarChat implements Serializable { - private MarkerLocation location; private String type; + private MarkerLocation location; private MarkerUserInfo userInfo; public MarkerLocation getLocation() { diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerDynamicData.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerDynamicData.java index 5bd61f4ddf..c535a956f9 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerDynamicData.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerDynamicData.java @@ -7,15 +7,15 @@ import java.io.Serializable; @SuppressWarnings("unused") public class MarkerDynamicData implements Serializable { - private Long id; + private double id; private String name; - private Long type; + private double type; - public Long getId() { + public double getId() { return id; } - public void setId(Long id) { + public void setId(double id) { this.id = id; } @@ -27,7 +27,7 @@ public class MarkerDynamicData implements Serializable { this.name = name; } - public Long getType() { + public double getType() { return type; } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWay.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWay.java index 51c6e88820..df0972cfb3 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWay.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWay.java @@ -7,18 +7,18 @@ import java.util.List; @SuppressWarnings("unused") public class MarkerExploreWay implements Serializable { - private String addr; - private boolean canLive; - private String cityName; - private float direction; - private Long distance; - private Long fileType; - private Long generateTime; - private List items; - private String type; - private MarkerLocation location; + private String type;//卡片类型, private String sn; - private MarkerUserInfo userInfo; + private MarkerLocation location;//位置信息 + private int direction;//方位角度 + private boolean canLive;//是否可直播(1为可直播,0不可直播) + private int fileType;//是图片还是视频(1视频,0图片) + private String addr;//北京市朝阳区三里屯街道108号 + private long generateTime;//时间戳 + private String cityName;//:"城市名称", + private double distance;//距离 + private MarkerUserInfo userInfo;//用户信息 + private List items;//视频地址和图片地址 public String getAddr() { return addr; @@ -48,23 +48,23 @@ public class MarkerExploreWay implements Serializable { return direction; } - public void setDirection(float direction) { + public void setDirection(int direction) { this.direction = direction; } - public Long getDistance() { + public double getDistance() { return distance; } - public void setDistance(Long distance) { + public void setDistance(double distance) { this.distance = distance; } - public Long getFileType() { + public double getFileType() { return fileType; } - public void setFileType(Long fileType) { + public void setFileType(int fileType) { this.fileType = fileType; } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerHobbyDatum.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerHobbyDatum.java index d364b2ef3c..4cf8e1504c 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerHobbyDatum.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerHobbyDatum.java @@ -7,7 +7,6 @@ import java.io.Serializable; @SuppressWarnings("unused") public class MarkerHobbyDatum implements Serializable { - private String content; private int isCheck; diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerLocation.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerLocation.java index 38715c15aa..9895187033 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerLocation.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerLocation.java @@ -7,10 +7,34 @@ import java.io.Serializable; @SuppressWarnings("unused") public class MarkerLocation implements Serializable { - private String address; - private float angle; - private Double lat; - private Double lon; + private double lat;//纬度 + private double lon;//经度 + private double angle;//车头角度,可以没有 + private String address;//具体的位置信息 + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLon() { + return lon; + } + + public void setLon(double lon) { + this.lon = lon; + } + + public double getAngle() { + return angle; + } + + public void setAngle(double angle) { + this.angle = angle; + } public String getAddress() { return address; @@ -20,37 +44,13 @@ public class MarkerLocation implements Serializable { this.address = address; } - public float getAngle() { - return angle; - } - - public void setAngle(float angle) { - this.angle = angle; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public Double getLon() { - return lon; - } - - public void setLon(Double lon) { - this.lon = lon; - } - @Override public String toString() { return "MarkerLocation{" + - "address='" + address + '\'' + - ", angle=" + angle + - ", lat=" + lat + + "lat=" + lat + ", lon=" + lon + + ", angle=" + angle + + ", address='" + address + '\'' + '}'; } } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerOnlineCar.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerOnlineCar.java index 6ee700ecd0..1bc7ea165b 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerOnlineCar.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerOnlineCar.java @@ -7,15 +7,15 @@ import java.util.List; @SuppressWarnings("unused") public class MarkerOnlineCar implements Serializable { - private List activitiesScope; - private MarkerCarInfo carInfo; - private String compatibility; - private MarkerDynamicData dynamicData; - private List hobbyData; - private boolean isFocus; - private MarkerLocation location; - private String type; - private MarkerUserInfo userInfo; + private String type;//卡片类型 + private MarkerLocation location;//所在位置 + private Boolean isFocus;//isFocus":"0-未关注,1-关注 + private MarkerUserInfo userInfo;//用户数据 + private MarkerCarInfo carInfo;//车辆数据 + private MarkerDynamicData dynamicData;//动态数据 + private List hobbyData;//爱好数据集合 + private List activitiesScope;//活动范围数据集合 + private double compatibility; public List getActivitiesScope() { return activitiesScope; @@ -33,11 +33,11 @@ public class MarkerOnlineCar implements Serializable { this.carInfo = carInfo; } - public String getCompatibility() { + public double getCompatibility() { return compatibility; } - public void setCompatibility(String compatibility) { + public void setCompatibility(double compatibility) { this.compatibility = compatibility; } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerShareMusic.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerShareMusic.java index d4f7dfb32c..f31c94f46e 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerShareMusic.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerShareMusic.java @@ -8,8 +8,8 @@ import java.io.Serializable; public class MarkerShareMusic implements Serializable { private String bookInfo; - private long id; - private int likeNumber; + private Double id; + private Double likeNumber; private MarkerLocation location; private String mediaId; private String mediaImg; @@ -17,7 +17,7 @@ public class MarkerShareMusic implements Serializable { private String mediaSinger; private String mediaUrl; private String shareContentText; - private int shareType; + private Double shareType; private String type; private MarkerUserInfo userInfo; @@ -29,30 +29,22 @@ public class MarkerShareMusic implements Serializable { this.bookInfo = bookInfo; } - public long getId() { + public Double getId() { return id; } - public void setId(long id) { + public void setId(Double id) { this.id = id; } - public int getLikeNumber() { + public Double getLikeNumber() { return likeNumber; } - public void setLikeNumber(int likeNumber) { + public void setLikeNumber(Double likeNumber) { this.likeNumber = likeNumber; } - public MarkerLocation getLocation() { - return location; - } - - public void setLocation(MarkerLocation location) { - this.location = location; - } - public String getMediaId() { return mediaId; } @@ -101,11 +93,11 @@ public class MarkerShareMusic implements Serializable { this.shareContentText = shareContentText; } - public int getShareType() { + public Double getShareType() { return shareType; } - public void setShareType(int shareType) { + public void setShareType(Double shareType) { this.shareType = shareType; } @@ -125,6 +117,15 @@ public class MarkerShareMusic implements Serializable { this.userInfo = userInfo; } + public MarkerLocation getLocation() { + return location; + } + + public void setLocation(MarkerLocation location) { + this.location = location; + } + + @Override public String toString() { return "MarkerShareMusic{" + diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerShowEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerShowEntity.java index 1572906b37..1abd3e3eea 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerShowEntity.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerShowEntity.java @@ -19,10 +19,8 @@ public class MarkerShowEntity { private String textContent; // Marker 类型 private String markerType; - // 绑定 MarkerView 的数据 private Object bindObj; - //Marker 经纬度位置信息 private MarkerLocation markerLocation; @@ -58,7 +56,6 @@ public class MarkerShowEntity { this.markerType = markerType; } - public Object getBindObj() { return bindObj; } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerUserInfo.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerUserInfo.java index a817adba38..5c29773053 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerUserInfo.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerUserInfo.java @@ -9,12 +9,12 @@ import java.util.Calendar; @SuppressWarnings("unused") public class MarkerUserInfo implements Serializable { - private int age; - private String gender; private String sn; - private String userHead; - private Long userId; - private String userName; + private long userId; + private String userName;//用户昵称 + private String userHead;//用户头像 + private String gender;//gender": "男|女|无(也可以0|1|2根据实际库存返回即可) + private int age;// 年龄段,可以为空,与车聊聊一致 public void setAge(int age) { this.age = age; @@ -25,7 +25,7 @@ public class MarkerUserInfo implements Serializable { int year = cal.get(Calendar.YEAR); //2020-30=1990 - int ageDiffer = year - age; + double ageDiffer = year - age; String ageStr = "" + ageDiffer; char[] ageChars = ageStr.toCharArray(); 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 2e67e2e710..4355d670d9 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 @@ -167,7 +167,7 @@ public class MarkerServiceHandler { List carChat = markerCardResult.getCarChat(); List onlineCar = markerCardResult.getOnlineCar(); List exploreWay = markerCardResult.getExploreWay(); - List shareMusic = markerCardResult.getShareMusic(); +// List shareMusic = markerCardResult.getShareMusic(); if (carChat != null) { for (MarkerCarChat markerCarChat : carChat) { @@ -209,27 +209,26 @@ public class MarkerServiceHandler { markerShowEntity.setMarkerLocation(markerLocation); markerShowEntity.setMarkerType(markerExploreWay.getType()); markerShowEntity.setTextContent(markerExploreWay.getAddr()); - markerShowEntity.setIconUrl(markerExploreWay.getUserInfo().getUserHead()); drawMapMarker(markerShowEntity); } } } - if (shareMusic != null) { - for (MarkerShareMusic markerShareMusic : shareMusic) { - MarkerLocation markerLocation = markerShareMusic.getLocation(); - - MarkerShowEntity markerShowEntity = new MarkerShowEntity(); - markerShowEntity.setBindObj(markerShareMusic); - markerShowEntity.setMarkerLocation(markerLocation); - markerShowEntity.setMarkerType(markerShareMusic.getType()); - markerShowEntity.setTextContent(markerShareMusic.getMediaName()); - markerShowEntity.setIconUrl(markerShareMusic.getMediaImg()); - - drawMapMarker(markerShowEntity); - } - } +// if (shareMusic != null) { +// for (MarkerShareMusic markerShareMusic : shareMusic) { +// MarkerLocation markerLocation = markerShareMusic.getLocation(); +// +// MarkerShowEntity markerShowEntity = new MarkerShowEntity(); +// markerShowEntity.setBindObj(markerShareMusic); +// markerShowEntity.setMarkerLocation(markerLocation); +// markerShowEntity.setMarkerType(markerShareMusic.getType()); +// markerShowEntity.setTextContent(markerShareMusic.getMediaName()); +// markerShowEntity.setIconUrl(markerShareMusic.getMediaImg()); +// +// drawMapMarker(markerShowEntity); +// } +// } } getMapUIController().changeZoom(8); @@ -240,19 +239,24 @@ public class MarkerServiceHandler { */ public static IMogoMarker drawMapMarker(MarkerShowEntity markerShowEntity) { Logger.e(TAG, "绘制Marker====markerTag:" + markerShowEntity); - View markerView = MapMarkerAdapter.getMarkerView(mContext, markerShowEntity); - MogoMarkerOptions options = new MogoMarkerOptions() - .owner(markerShowEntity.getMarkerType()) - .latitude(markerShowEntity.getMarkerLocation().getLat()) - .longitude(markerShowEntity.getMarkerLocation().getLon()); - options.icon(markerView); + if (markerShowEntity.getMarkerLocation() != null) { + View markerView = MapMarkerAdapter.getMarkerView(mContext, markerShowEntity); - IMogoMarker marker = getMarkerManager().addMarker(markerShowEntity.getMarkerType(), options); - marker.setOnMarkerClickListener(mogoMarkerClickListener); - marker.setObject(markerShowEntity); + MogoMarkerOptions options = new MogoMarkerOptions() + .owner(markerShowEntity.getMarkerType()) + .latitude(markerShowEntity.getMarkerLocation().getLat()) + .longitude(markerShowEntity.getMarkerLocation().getLon()); + options.icon(markerView); - return marker; + IMogoMarker marker = getMarkerManager().addMarker(markerShowEntity.getMarkerType(), options); + marker.setOnMarkerClickListener(mogoMarkerClickListener); + marker.setObject(markerShowEntity); + return marker; + } else { + Logger.e(TAG, "Location 必须进行初始化!!!!!"); + } + return null; } 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 e379d4fc47..0ae6100313 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 @@ -91,7 +91,7 @@ public class MapMarkerInfoView extends MapMarkerBaseView { break; } - ivCar.setRotation(markerShowEntity.getMarkerLocation().getAngle()); + ivCar.setRotation((float) markerShowEntity.getMarkerLocation().getAngle()); if (!TextUtils.isEmpty(markerShowEntity.getTextContent())) { tvMarkerContent.setText(markerShowEntity.getTextContent()); } 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 5a4c1e7e42..e1ac66d2f6 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 @@ -81,7 +81,7 @@ public class MapMarkerView extends MapMarkerBaseView { ivBg.setImageResource(R.drawable.bg_map_marker_purple); break; } - ivCar.setRotation(markerShowEntity.getMarkerLocation().getAngle()); + ivCar.setRotation((float) markerShowEntity.getMarkerLocation().getAngle()); loadImageWithMarker(markerShowEntity); diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java index dc1dd00c70..ed29a8c4a9 100644 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java +++ b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java @@ -375,10 +375,10 @@ public class TanluCardViewFragment extends MvpFragment> * @param exploreWay */ private void handleData(MarkerExploreWay exploreWay) { - if (exploreWay != null && exploreWay.getFileType() != null) { - if (exploreWay.getFileType().equals("0")) { //图片 + if (exploreWay != null ) { + if (exploreWay.getFileType()==0) { //图片 refreshPhotoData(exploreWay); - } else if (exploreWay.getFileType().equals("1")) { //视频 + } else if (exploreWay.getFileType()==1) { //视频 refreshVideoData(exploreWay); } } else { @@ -483,10 +483,10 @@ public class TanluCardViewFragment extends MvpFragment> //展示第一个数据 MarkerExploreWay markerExploreWay = markerExploreWayList.get(0); - if (markerExploreWay != null && markerExploreWay.getFileType() != null) { - if (markerExploreWay.getFileType().equals("0")) { //图片 + if (markerExploreWay != null) { + if (markerExploreWay.getFileType()==0) { //图片 refreshPhotoData(markerExploreWay); - } else if (markerExploreWay.getFileType().equals("1")) { //视频 + } else if (markerExploreWay.getFileType()==1) { //视频 refreshVideoData(markerExploreWay); } } diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/Utils.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/Utils.java index c88085e0f5..55634d1bb8 100644 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/Utils.java +++ b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/Utils.java @@ -10,7 +10,7 @@ import java.text.DecimalFormat; public class Utils { //处理距离,大于1000时,四舍五入保留一位小数 - public static String handleDistance(long distance) { + public static String handleDistance(double distance) { if (distance < 1000) { return distance + "M"; } else { From 0f8c0f9e62b77084759f9812e85b66c3ec8abc7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Mon, 13 Jan 2020 20:53:24 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BC=95=E8=B5=B7=E7=9A=84marker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mogo/module/common/entity/MarkerDynamicData.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerDynamicData.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerDynamicData.java index c535a956f9..a345206b2e 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerDynamicData.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerDynamicData.java @@ -31,7 +31,7 @@ public class MarkerDynamicData implements Serializable { return type; } - public void setType(Long type) { + public void setType(double type) { this.type = type; } From ed05076dafa5cb3dfd9cb8a262354c9f70af3ed7 Mon Sep 17 00:00:00 2001 From: zhangyuanzhen Date: Mon, 13 Jan 2020 20:56:26 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/mogo-module-extensions/build.gradle | 2 +- .../extensions/dialog/NaviNoticeDialog.java | 73 +++++++++++++++++++ .../extensions/entrance/EntranceFragment.java | 4 +- .../res/drawable/shape_react_blue_grident.xml | 9 +++ .../res/drawable/shape_react_gray_grident.xml | 9 +++ .../main/res/layout/dialog_navi_notice.xml | 57 +++++++++++++++ 6 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/dialog/NaviNoticeDialog.java create mode 100644 modules/mogo-module-extensions/src/main/res/drawable/shape_react_blue_grident.xml create mode 100644 modules/mogo-module-extensions/src/main/res/drawable/shape_react_gray_grident.xml create mode 100644 modules/mogo-module-extensions/src/main/res/layout/dialog_navi_notice.xml diff --git a/modules/mogo-module-extensions/build.gradle b/modules/mogo-module-extensions/build.gradle index 7ec6c89d89..5c2e75d70a 100644 --- a/modules/mogo-module-extensions/build.gradle +++ b/modules/mogo-module-extensions/build.gradle @@ -36,7 +36,7 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - + implementation rootProject.ext.dependencies.androidxcardview implementation rootProject.ext.dependencies.androidxappcompat implementation rootProject.ext.dependencies.androidxconstraintlayout implementation rootProject.ext.dependencies.arouter diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/dialog/NaviNoticeDialog.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/dialog/NaviNoticeDialog.java new file mode 100644 index 0000000000..594bd06e89 --- /dev/null +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/dialog/NaviNoticeDialog.java @@ -0,0 +1,73 @@ +package com.mogo.module.extensions.dialog; + +import android.app.Dialog; +import android.content.Context; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.RelativeLayout; +import android.widget.TextView; +import androidx.annotation.NonNull; +import com.alibaba.android.arouter.launcher.ARouter; +import com.mogo.module.extensions.R; +import com.mogo.service.MogoServicePaths; +import com.mogo.service.map.IMogoMapService; +import com.mogo.utils.logger.Logger; + +/** + * @author lixiaopeng + * @description 通用分享dialog + * @since 2020-01-10 + */ +public class NaviNoticeDialog extends Dialog implements View.OnClickListener { + private TextView txtOk; + private Context mContext; + private View tvCancel; + private IMogoMapService mMogoMapService; + + public NaviNoticeDialog(@NonNull Context context) { + super(context); + this.mContext = context; + mMogoMapService = (IMogoMapService) ARouter.getInstance() + .build(MogoServicePaths.PATH_SERVICES_MAP) + .navigation(getContext()); + getWindow().setBackgroundDrawableResource(android.R.color.transparent); + } + + public NaviNoticeDialog(@NonNull Context context, int themeResId) { + super(context, R.style.Theme_AppCompat_Dialog); + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + initView(); + initListener(); + } + + private void initView() { + setContentView(R.layout.dialog_navi_notice); + txtOk = findViewById(R.id.tv_dialog_ok); + tvCancel = findViewById(R.id.tv_dialog_cancel); + } + + + private void initListener() { + txtOk.setOnClickListener(this); + tvCancel.setOnClickListener(this); + } + + + @Override + public void onClick(View view) { + int id = view.getId(); + if (id == R.id.tv_dialog_ok) { + mMogoMapService.getNavi(getContext()).stopNavi(); + } else if (id == R.id.tv_dialog_cancel) { + + } + dismiss(); + } + + +} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java index 813feb9a65..c9a0d73936 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java @@ -27,6 +27,7 @@ import com.mogo.map.uicontroller.IMogoMapUIController; import com.mogo.module.common.MogoModulePaths; import com.mogo.module.extensions.ExtensionsModuleConst; import com.mogo.module.extensions.R; +import com.mogo.module.extensions.dialog.NaviNoticeDialog; import com.mogo.module.extensions.navi.NaviInfoView; import com.mogo.module.share.ShareControl; import com.mogo.module.share.dialog.LaucherShareDialog; @@ -132,7 +133,8 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent mExitNavi.setOnClickListener( view -> { if ( mMogoNavi != null ) { if ( mIsLock ) { - mMogoNavi.stopNavi(); + NaviNoticeDialog naviNoticeDialog = new NaviNoticeDialog(getContext()); + naviNoticeDialog.show(); } else { mMApUIController.recoverLockMode(); } diff --git a/modules/mogo-module-extensions/src/main/res/drawable/shape_react_blue_grident.xml b/modules/mogo-module-extensions/src/main/res/drawable/shape_react_blue_grident.xml new file mode 100644 index 0000000000..804e5a8de3 --- /dev/null +++ b/modules/mogo-module-extensions/src/main/res/drawable/shape_react_blue_grident.xml @@ -0,0 +1,9 @@ + + + + + + diff --git a/modules/mogo-module-extensions/src/main/res/drawable/shape_react_gray_grident.xml b/modules/mogo-module-extensions/src/main/res/drawable/shape_react_gray_grident.xml new file mode 100644 index 0000000000..377483211d --- /dev/null +++ b/modules/mogo-module-extensions/src/main/res/drawable/shape_react_gray_grident.xml @@ -0,0 +1,9 @@ + + + + + + diff --git a/modules/mogo-module-extensions/src/main/res/layout/dialog_navi_notice.xml b/modules/mogo-module-extensions/src/main/res/layout/dialog_navi_notice.xml new file mode 100644 index 0000000000..584dff5c93 --- /dev/null +++ b/modules/mogo-module-extensions/src/main/res/layout/dialog_navi_notice.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + \ No newline at end of file From a0b00bc400546fc2a1ab1900d04aff8577cae27f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Mon, 13 Jan 2020 20:59:12 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E8=AE=BE?= =?UTF-8?q?=E7=BD=AEmarker=E4=B8=AA=E6=95=B0=E4=B8=BA5=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mogo/module/service/network/RefreshModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshModel.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshModel.java index 618aed2396..a30ca0e83b 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshModel.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshModel.java @@ -57,7 +57,7 @@ public class RefreshModel { if ( mRefreshApiService != null ) { final Map< String, Object > query = new ParamsProvider.Builder( mContext ).build(); final RefreshBody refreshBody = new RefreshBody(); - refreshBody.limit = 50; + refreshBody.limit = 5; refreshBody.location = new RefreshBody.LatLon( latLng.lat, latLng.lng ); refreshBody.radius = radius; query.put( "data", GsonUtil.jsonFromObject( refreshBody ) ); From caa58b83e6cd1b1861a5fe35301718b69961e82f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Mon, 13 Jan 2020 21:36:10 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E8=AE=BE?= =?UTF-8?q?=E7=BD=AEmarker=E4=B8=AA=E6=95=B0=E4=B8=BA5=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/layout/view_map_marker_info.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/mogo-module-service/src/main/res/layout/view_map_marker_info.xml b/modules/mogo-module-service/src/main/res/layout/view_map_marker_info.xml index ecf4962bda..a2d3e6ad2a 100644 --- a/modules/mogo-module-service/src/main/res/layout/view_map_marker_info.xml +++ b/modules/mogo-module-service/src/main/res/layout/view_map_marker_info.xml @@ -22,7 +22,7 @@ android:id="@+id/llMarkerContent" android:layout_width="wrap_content" android:layout_height="@dimen/dp_74" - android:background="@drawable/bg_map_marker_blue_info" + android:background="@drawable/bg_map_marker_green_info" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" > @@ -71,7 +71,7 @@ android:id="@+id/ivReverseTriangle" android:layout_width="10dp" android:layout_height="10dp" - android:src="@drawable/bg_shape_reverse_triangle_blue" + android:src="@drawable/bg_shape_reverse_triangle_green" app:layout_constraintEnd_toEndOf="@+id/llMarkerContent" app:layout_constraintStart_toStartOf="@+id/llMarkerContent" app:layout_constraintTop_toBottomOf="@+id/llMarkerContent" />