@Override protected Call<MapMatchingResponse> initializeCall() { return getService().getCall( ApiCallHelper.getHeaderUserAgent(clientAppName()), user(), profile(), coordinates(), accessToken(), geometries(), radiuses(), steps(), overview(), timestamps(), annotations(), language(), tidy(), roundaboutExits(), bannerInstructions(), voiceInstructions(), voiceUnits(), waypoints(), waypointNames(), approaches()); }
private List<MapMatchingMatching> generateRouteOptions(Response<MapMatchingResponse> response) { List<MapMatchingMatching> matchings = response.body().matchings(); List<MapMatchingMatching> modifiedMatchings = new ArrayList<>(); for (MapMatchingMatching matching : matchings) { modifiedMatchings.add(matching.toBuilder().routeOptions( RouteOptions.builder() .profile(profile()) .coordinates(formatCoordinates(coordinates())) .annotations(annotations()) .approaches(approaches()) .language(language()) .radiuses(radiuses()) .user(user()) .voiceInstructions(voiceInstructions()) .bannerInstructions(bannerInstructions()) .roundaboutExits(roundaboutExits()) .geometries(geometries()) .overview(overview()) .steps(steps()) .voiceUnits(voiceUnits()) .requestUuid(PLACEHOLDER_UUID) .accessToken(accessToken()) .approaches(approaches()) .waypointNames(waypointNames()) .baseUrl(baseUrl()) .build() ).build()); } return modifiedMatchings; }
public Response<MapMatchingResponse> executeCall() throws IOException { Response<MapMatchingResponse> response = getCall().execute(); if (response.isSuccessful()) { if (response.body() != null && !response.body().matchings().isEmpty()) { response.body() .toBuilder() .matchings(generateRouteOptions(response)) .build(), new okhttp3.Response.Builder() errorDidOccur(null, response);
if (!MapboxUtils.isAccessTokenValid(mapMatching.accessToken())) { throw new ServicesException("Using Mapbox Services requires setting a valid access token.");
public Response<MapMatchingResponse> executeCall() throws IOException { Response<MapMatchingResponse> response = getCall().execute(); if (response.isSuccessful()) { if (response.body() != null && !response.body().matchings().isEmpty()) { response.body() .toBuilder() .matchings(generateRouteOptions(response)) .build(), new okhttp3.Response.Builder() errorDidOccur(null, response);
if (!MapboxUtils.isAccessTokenValid(mapMatching.accessToken())) { throw new ServicesException("Using Mapbox Services requires setting a valid access token.");
@Override protected Call<MapMatchingResponse> initializeCall() { return getService().getCall( ApiCallHelper.getHeaderUserAgent(clientAppName()), user(), profile(), coordinates(), accessToken(), geometries(), radiuses(), steps(), overview(), timestamps(), annotations(), language(), tidy(), roundaboutExits(), bannerInstructions(), voiceInstructions(), voiceUnits(), waypoints(), waypointNames(), approaches()); }
private List<MapMatchingMatching> generateRouteOptions(Response<MapMatchingResponse> response) { List<MapMatchingMatching> matchings = response.body().matchings(); List<MapMatchingMatching> modifiedMatchings = new ArrayList<>(); for (MapMatchingMatching matching : matchings) { modifiedMatchings.add(matching.toBuilder().routeOptions( RouteOptions.builder() .profile(profile()) .coordinates(formatCoordinates(coordinates())) .annotations(annotations()) .approaches(approaches()) .language(language()) .radiuses(radiuses()) .user(user()) .voiceInstructions(voiceInstructions()) .bannerInstructions(bannerInstructions()) .roundaboutExits(roundaboutExits()) .geometries(geometries()) .overview(overview()) .steps(steps()) .voiceUnits(voiceUnits()) .requestUuid(PLACEHOLDER_UUID) .accessToken(accessToken()) .approaches(approaches()) .waypointNames(waypointNames()) .baseUrl(baseUrl()) .build() ).build()); } return modifiedMatchings; }
public Response<MapMatchingResponse> executeCall() throws IOException { Response<MapMatchingResponse> response = getCall().execute(); if (response.isSuccessful()) { if (response.body() != null && !response.body().matchings().isEmpty()) { response.body() .toBuilder() .matchings(generateRouteOptions(response)) .build(), new okhttp3.Response.Builder() errorDidOccur(null, response);
if (!MapboxUtils.isAccessTokenValid(mapMatching.accessToken())) { throw new ServicesException("Using Mapbox Services requires setting a valid access token.");
@Override protected Call<MapMatchingResponse> initializeCall() { return getService().getCall( ApiCallHelper.getHeaderUserAgent(clientAppName()), user(), profile(), coordinates(), accessToken(), geometries(), radiuses(), steps(), overview(), timestamps(), annotations(), language(), tidy(), roundaboutExits(), bannerInstructions(), voiceInstructions(), voiceUnits(), waypoints(), waypointNames(), approaches()); }
private List<MapMatchingMatching> generateRouteOptions(Response<MapMatchingResponse> response) { List<MapMatchingMatching> matchings = response.body().matchings(); List<MapMatchingMatching> modifiedMatchings = new ArrayList<>(); for (MapMatchingMatching matching : matchings) { modifiedMatchings.add(matching.toBuilder().routeOptions( RouteOptions.builder() .profile(profile()) .coordinates(formatCoordinates(coordinates())) .annotations(annotations()) .approaches(approaches()) .language(language()) .radiuses(radiuses()) .user(user()) .voiceInstructions(voiceInstructions()) .bannerInstructions(bannerInstructions()) .roundaboutExits(roundaboutExits()) .geometries(geometries()) .overview(overview()) .steps(steps()) .voiceUnits(voiceUnits()) .requestUuid(PLACEHOLDER_UUID) .accessToken(accessToken()) .approaches(approaches()) .waypointNames(waypointNames()) .baseUrl(baseUrl()) .build() ).build()); } return modifiedMatchings; }