use of com.zendrive.sdk.ZendriveExtrapolationDetails in project zendrive-sdk-android-sample by zendrive.
the class MapActivity method getExtrapolatedLatLngPoints.
private List<LatLng> getExtrapolatedLatLngPoints(DriveInfo driveInfo) {
List<LatLng> extrapolatedWaypoints = new ArrayList<>();
ZendriveExtrapolationDetails extrapolationDetails = driveInfo.extrapolationDetails;
if (extrapolationDetails != null && extrapolationDetails.estimatedStartLocation != null) {
LocationPoint estimatedStartLocation = extrapolationDetails.estimatedStartLocation;
LatLng estimatedStartLatLng = new LatLng(estimatedStartLocation.latitude, estimatedStartLocation.longitude);
extrapolatedWaypoints.add(estimatedStartLatLng);
LocationPoint actualStartLocation = driveInfo.waypoints.get(0).location;
LatLng actualStartLocationLatLng = new LatLng(actualStartLocation.latitude, actualStartLocation.longitude);
extrapolatedWaypoints.add(actualStartLocationLatLng);
}
return extrapolatedWaypoints;
}
Aggregations