onlinecar smooth fix bug
This commit is contained in:
@@ -17,6 +17,22 @@ public class MarkerOnlineCar implements Serializable {
|
|||||||
private List<MarkerActivitiesScope> activitiesScope;//活动范围数据集合
|
private List<MarkerActivitiesScope> activitiesScope;//活动范围数据集合
|
||||||
private int compatibility;//匹配度
|
private int compatibility;//匹配度
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MarkerLocation getLocation() {
|
||||||
|
return location;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocation(MarkerLocation location) {
|
||||||
|
this.location = location;
|
||||||
|
}
|
||||||
|
|
||||||
public Boolean getFocus() {
|
public Boolean getFocus() {
|
||||||
return isFocus;
|
return isFocus;
|
||||||
}
|
}
|
||||||
@@ -25,20 +41,12 @@ public class MarkerOnlineCar implements Serializable {
|
|||||||
isFocus = focus;
|
isFocus = focus;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<MarkerCarPois> getPois() {
|
public MarkerUserInfo getUserInfo() {
|
||||||
return pois;
|
return userInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPois(List<MarkerCarPois> pois) {
|
public void setUserInfo(MarkerUserInfo userInfo) {
|
||||||
this.pois = pois;
|
this.userInfo = userInfo;
|
||||||
}
|
|
||||||
|
|
||||||
public List<MarkerActivitiesScope> getActivitiesScope() {
|
|
||||||
return activitiesScope;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setActivitiesScope(List<MarkerActivitiesScope> activitiesScope) {
|
|
||||||
this.activitiesScope = activitiesScope;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public MarkerCarInfo getCarInfo() {
|
public MarkerCarInfo getCarInfo() {
|
||||||
@@ -49,12 +57,12 @@ public class MarkerOnlineCar implements Serializable {
|
|||||||
this.carInfo = carInfo;
|
this.carInfo = carInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getCompatibility() {
|
public List<MarkerCarPois> getPois() {
|
||||||
return compatibility;
|
return pois;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCompatibility(int compatibility) {
|
public void setPois(List<MarkerCarPois> pois) {
|
||||||
this.compatibility = compatibility;
|
this.pois = pois;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MarkerDynamicData getDynamicData() {
|
public MarkerDynamicData getDynamicData() {
|
||||||
@@ -73,36 +81,20 @@ public class MarkerOnlineCar implements Serializable {
|
|||||||
this.hobbyData = hobbyData;
|
this.hobbyData = hobbyData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getIsFocus() {
|
public List<MarkerActivitiesScope> getActivitiesScope() {
|
||||||
return isFocus;
|
return activitiesScope;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIsFocus(boolean isFocus) {
|
public void setActivitiesScope(List<MarkerActivitiesScope> activitiesScope) {
|
||||||
this.isFocus = isFocus;
|
this.activitiesScope = activitiesScope;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MarkerLocation getLocation() {
|
public int getCompatibility() {
|
||||||
return location;
|
return compatibility;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLocation(MarkerLocation location) {
|
public void setCompatibility(int compatibility) {
|
||||||
this.location = location;
|
this.compatibility = compatibility;
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -702,11 +702,11 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
|||||||
if (mLastDataResult == null) {
|
if (mLastDataResult == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<MarkerOnlineCar> onlineCarList = mLastDataResult.getOnlineCar();
|
// List<MarkerOnlineCar> onlineCarList = mLastDataResult.getOnlineCar();
|
||||||
List<MarkerExploreWay> exploreWayList = mLastDataResult.getExploreWay();
|
List<MarkerExploreWay> exploreWayList = mLastDataResult.getExploreWay();
|
||||||
List<MarkerNoveltyInfo> noveltyInfoList = mLastDataResult.getNoveltyInfo();
|
List<MarkerNoveltyInfo> noveltyInfoList = mLastDataResult.getNoveltyInfo();
|
||||||
dispatchDataToBis(ServiceConst.CARD_TYPE_USER_DATA, onlineCarList == null ?
|
// dispatchDataToBis(ServiceConst.CARD_TYPE_USER_DATA, onlineCarList == null ?
|
||||||
new ArrayList<>() : onlineCarList);
|
// new ArrayList<>() : onlineCarList);
|
||||||
dispatchDataToBis(ServiceConst.CARD_TYPE_ROAD_CONDITION, exploreWayList == null ?
|
dispatchDataToBis(ServiceConst.CARD_TYPE_ROAD_CONDITION, exploreWayList == null ?
|
||||||
new ArrayList<>() : exploreWayList);
|
new ArrayList<>() : exploreWayList);
|
||||||
dispatchDataToBis(ServiceConst.CARD_TYPE_NOVELTY, noveltyInfoList == null ?
|
dispatchDataToBis(ServiceConst.CARD_TYPE_NOVELTY, noveltyInfoList == null ?
|
||||||
@@ -824,31 +824,38 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
|||||||
};
|
};
|
||||||
|
|
||||||
private void getOnlineCarList() {
|
private void getOnlineCarList() {
|
||||||
mRefreshModel.queryOnLineCarWithRoute(mCarLatLng, false, false, new RefreshCallback() {
|
if (mCurrentModuleName.equals(ServiceConst.CARD_TYPE_BUSINESS_OPERATION )
|
||||||
@Override
|
|| mCurrentModuleName.equals(ServiceConst.CARD_TYPE_USER_DATA) ) {
|
||||||
public void onSuccess(Object o) {
|
|
||||||
|
|
||||||
MarkerResponse data = (MarkerResponse) o;
|
mRefreshModel.queryOnLineCarWithRoute(mCarLatLng, false, false, new RefreshCallback() {
|
||||||
MarkerCardResult result = data.getResult();
|
@Override
|
||||||
if (result == null) {
|
public void onSuccess(Object o) {
|
||||||
return;
|
MarkerResponse data = (MarkerResponse) o;
|
||||||
|
MarkerCardResult result = data.getResult();
|
||||||
|
if (result == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < carMarkers.size(); i++) {
|
||||||
|
IMogoMarker marker = carMarkers.get(i);
|
||||||
|
marker.destroy();
|
||||||
|
}
|
||||||
|
List<MarkerOnlineCar> onlineCarList = result.getOnlineCar();
|
||||||
|
dispatchDataToBis(ServiceConst.CARD_TYPE_USER_DATA, onlineCarList == null ? new ArrayList<>() : onlineCarList);
|
||||||
|
drawOnlineCarMarkers(onlineCarList, ServiceConst.MAX_AMOUNT_SINGLE_CARD);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < carMarkers.size(); i++) {
|
@Override
|
||||||
IMogoMarker marker = carMarkers.get(i);
|
public void onFail() {
|
||||||
marker.destroy();
|
|
||||||
}
|
}
|
||||||
List<MarkerOnlineCar> onlineCarList = result.getOnlineCar();
|
});
|
||||||
// Logger.d(TAG, "在线数量" + onlineCarList.size());
|
}else {
|
||||||
dispatchDataToBis(ServiceConst.CARD_TYPE_USER_DATA, onlineCarList == null ? new ArrayList<>() : onlineCarList);
|
for (int i = 0; i < carMarkers.size(); i++) {
|
||||||
drawOnlineCarMarkers(onlineCarList, ServiceConst.MAX_AMOUNT_SINGLE_CARD);
|
IMogoMarker marker = carMarkers.get(i);
|
||||||
|
marker.destroy();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public void onFail() {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 平滑移动
|
// 平滑移动
|
||||||
@@ -857,19 +864,23 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
|||||||
carMarkers.add(iMogoMarker);
|
carMarkers.add(iMogoMarker);
|
||||||
|
|
||||||
List<MarkerCarPois> poisList = markerOnlineCar.getPois();
|
List<MarkerCarPois> poisList = markerOnlineCar.getPois();
|
||||||
// Logger.d(TAG, "在线车辆路线坐标" + poisList.toString());
|
|
||||||
|
|
||||||
if (poisList.size() > 0) {
|
if (poisList != null && poisList.size() > 0) {
|
||||||
|
// Logger.d(TAG, "在线" + poisList.toString());
|
||||||
|
|
||||||
List<MogoLatLng> points = new ArrayList<>();
|
List<MogoLatLng> points = new ArrayList<>();
|
||||||
for (int j = 0; j < poisList.size(); j++) {
|
for (int j = 0; j < poisList.size(); j++) {
|
||||||
MarkerCarPois pois = poisList.get(j);
|
MarkerCarPois pois = poisList.get(j);
|
||||||
double lat = new Double(pois.getCoordinates().get(1).toString());
|
if (pois != null && pois.getCoordinates() != null && pois.getCoordinates().size() >= 2) {
|
||||||
double lng = new Double(pois.getCoordinates().get(0).toString());
|
double lat = Double.valueOf(pois.getCoordinates().get(1) + "");
|
||||||
points.add(new MogoLatLng(lat, lng));
|
double lng = Double.valueOf(pois.getCoordinates().get(0) + "");
|
||||||
|
points.add(new MogoLatLng(lat, lng));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (points.size() >= 1){
|
||||||
|
points.add(new MogoLatLng(markerLocation.getLat(), markerLocation.getLon()));
|
||||||
|
iMogoMarker.startSmooth(points, mCarSmoothDuration);
|
||||||
}
|
}
|
||||||
points.add(new MogoLatLng(markerLocation.getLat(), markerLocation.getLon()));
|
|
||||||
iMogoMarker.startSmooth(points, mCarSmoothDuration);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user