[base_3.4.0-map-sdk]
This commit is contained in:
@@ -2,6 +2,7 @@ package com.mogo.map.utils;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.map.exception.MogoMapException;
|
||||
import com.zhidaoauto.map.data.point.LonLatPoint;
|
||||
import com.zhidaoauto.map.sdk.open.camera.LatLngBounds;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -5,11 +5,11 @@ import android.graphics.Color;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import com.mogo.eagle.core.data.map.CenterLine;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.map.overlay.line.Polyline;
|
||||
import com.mogo.map.overlay.point.Point;
|
||||
import com.mogo.map.uicontroller.MapCameraPosition;
|
||||
import com.zhidaoauto.map.data.point.LonLatPoint;
|
||||
import com.zhidaoauto.map.sdk.open.camera.CameraPosition;
|
||||
import com.zhidaoauto.map.sdk.open.marker.BitmapDescriptor;
|
||||
import com.zhidaoauto.map.sdk.open.marker.BitmapDescriptorFactory;
|
||||
@@ -213,38 +213,4 @@ public class ObjectUtils {
|
||||
}
|
||||
return new MapCameraPosition(fromAMap(position.getTarget()), position.getBearing(), position.getTilt(), position.getZoom());
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换对象
|
||||
*
|
||||
* @return 转换后的对象
|
||||
*/
|
||||
public static CenterLine transformCenterLine(com.zhidaoauto.map.sdk.open.road.CenterLine centerLine) {
|
||||
CenterLine resultCenterLine = null;
|
||||
if (centerLine != null) {
|
||||
resultCenterLine = new CenterLine();
|
||||
resultCenterLine.setId(centerLine.getId());
|
||||
resultCenterLine.setLane_id(centerLine.getLane_id());
|
||||
resultCenterLine.setAngle(centerLine.getAngle());
|
||||
resultCenterLine.setRoad_id(centerLine.getRoad_id());
|
||||
resultCenterLine.setTile_id(centerLine.getTile_id());
|
||||
ArrayList<com.mogo.eagle.core.data.map.LonLatPoint> arrayList = new ArrayList<>();
|
||||
if (centerLine.getPoints() != null) {
|
||||
for (com.zhidaoauto.map.sdk.open.query.LonLatPoint point : centerLine.getPoints()) {
|
||||
com.mogo.eagle.core.data.map.LonLatPoint lonLatPoint = new com.mogo.eagle.core.data.map.LonLatPoint();
|
||||
lonLatPoint.setAltitude(point.getAltitude());
|
||||
lonLatPoint.setAngle(point.getAngle());
|
||||
lonLatPoint.setDistance(point.getDistance());
|
||||
lonLatPoint.setLatitude(point.getLatitude());
|
||||
lonLatPoint.setLongitude(point.getLongitude());
|
||||
lonLatPoint.setProvider(point.getProvider());
|
||||
lonLatPoint.setSpeed(point.getSpeed());
|
||||
lonLatPoint.setDuration(point.getDuration());
|
||||
arrayList.add(lonLatPoint);
|
||||
}
|
||||
resultCenterLine.setPoints(arrayList);
|
||||
}
|
||||
}
|
||||
return resultCenterLine;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user