解决了marker异常问题

This commit is contained in:
董宏宇
2020-01-13 19:17:47 +08:00
parent 7db83b5aeb
commit 77481c7ed9
4 changed files with 19 additions and 15 deletions

View File

@@ -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;
}
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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);
}
}
}