Merge branch 'feature/v1.0.4' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into feature/v1.0.4
This commit is contained in:
@@ -681,11 +681,11 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
if (mLastDataResult == null) {
|
||||
return;
|
||||
}
|
||||
List<MarkerOnlineCar> onlineCarList = mLastDataResult.getOnlineCar();
|
||||
// List<MarkerOnlineCar> onlineCarList = mLastDataResult.getOnlineCar();
|
||||
List<MarkerExploreWay> exploreWayList = mLastDataResult.getExploreWay();
|
||||
List<MarkerNoveltyInfo> noveltyInfoList = mLastDataResult.getNoveltyInfo();
|
||||
dispatchDataToBis(ServiceConst.CARD_TYPE_USER_DATA, onlineCarList == null ?
|
||||
new ArrayList<>() : onlineCarList);
|
||||
// dispatchDataToBis(ServiceConst.CARD_TYPE_USER_DATA, onlineCarList == null ?
|
||||
// new ArrayList<>() : onlineCarList);
|
||||
dispatchDataToBis(ServiceConst.CARD_TYPE_ROAD_CONDITION, exploreWayList == null ?
|
||||
new ArrayList<>() : exploreWayList);
|
||||
dispatchDataToBis(ServiceConst.CARD_TYPE_NOVELTY, noveltyInfoList == null ?
|
||||
@@ -818,31 +818,38 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
};
|
||||
|
||||
private void getOnlineCarList() {
|
||||
mRefreshModel.queryOnLineCarWithRoute(mCarLatLng, false, false, new RefreshCallback() {
|
||||
@Override
|
||||
public void onSuccess(Object o) {
|
||||
if (mCurrentModuleName.equals(ServiceConst.CARD_TYPE_BUSINESS_OPERATION )
|
||||
|| mCurrentModuleName.equals(ServiceConst.CARD_TYPE_USER_DATA) ) {
|
||||
|
||||
MarkerResponse data = (MarkerResponse) o;
|
||||
MarkerCardResult result = data.getResult();
|
||||
if (result == null) {
|
||||
return;
|
||||
mRefreshModel.queryOnLineCarWithRoute(mCarLatLng, false, false, new RefreshCallback() {
|
||||
@Override
|
||||
public void onSuccess(Object o) {
|
||||
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++) {
|
||||
IMogoMarker marker = carMarkers.get(i);
|
||||
marker.destroy();
|
||||
@Override
|
||||
public void onFail() {
|
||||
|
||||
}
|
||||
List<MarkerOnlineCar> onlineCarList = result.getOnlineCar();
|
||||
// Logger.d(TAG, "在线数量" + onlineCarList.size());
|
||||
dispatchDataToBis(ServiceConst.CARD_TYPE_USER_DATA, onlineCarList == null ? new ArrayList<>() : onlineCarList);
|
||||
drawOnlineCarMarkers(onlineCarList, ServiceConst.MAX_AMOUNT_SINGLE_CARD);
|
||||
});
|
||||
}else {
|
||||
for (int i = 0; i < carMarkers.size(); i++) {
|
||||
IMogoMarker marker = carMarkers.get(i);
|
||||
marker.destroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 平滑移动
|
||||
@@ -851,19 +858,23 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
carMarkers.add(iMogoMarker);
|
||||
|
||||
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<>();
|
||||
for (int j = 0; j < poisList.size(); j++) {
|
||||
MarkerCarPois pois = poisList.get(j);
|
||||
double lat = new Double(pois.getCoordinates().get(1).toString());
|
||||
double lng = new Double(pois.getCoordinates().get(0).toString());
|
||||
points.add(new MogoLatLng(lat, lng));
|
||||
if (pois != null && pois.getCoordinates() != null && pois.getCoordinates().size() >= 2) {
|
||||
double lat = Double.valueOf(pois.getCoordinates().get(1) + "");
|
||||
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