private void start() { RoutingApi routing = new RoutingApi(); String key = System.getProperty("graphhopper.key", ""); try { RouteResponse rsp = routing.routeGet(Arrays.asList("48.58467,11.57753", "48.572859,11.592464"), false, key, "en", true, "car", true, true, Arrays.<String>asList(), false, "fastest", null, null, null, null, null, null, null, null, null, null); RouteResponsePath path = rsp.getPaths().get(0); ResponseInstruction instr = path.getInstructions().get(0); System.out.println(instr.getText()); } catch (ApiException ex) { System.out.println(ex.getResponseBody()); throw new RuntimeException(ex); } } }
ApiResponse<RouteResponse> resp = routeGetWithHttpInfo(point, pointsEncoded, key, locale, instructions, vehicle, elevation, calcPoints, pointHint, chDisable, weighting, edgeTraversal, algorithm, heading, headingPenalty, passThrough, roundTripDistance, roundTripSeed, alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor, alternativeRouteMaxShareFactor); return resp.getData();
com.squareup.okhttp.Call call = routeGetValidateBeforeCall(point, pointsEncoded, key, locale, instructions, vehicle, elevation, calcPoints, pointHint, chDisable, weighting, edgeTraversal, algorithm, heading, headingPenalty, passThrough, details, roundTripDistance, roundTripSeed, alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor, alternativeRouteMaxShareFactor, avoid, null, null); Type localVarReturnType = new TypeToken<RouteResponse>(){}.getType(); return apiClient.execute(call, localVarReturnType);
Integer alternativeRouteMaxWeightFactor = null; Integer alternativeRouteMaxShareFactor = null; RouteResponse response = api.routeGet(point, pointsEncoded, key, locale, instructions, vehicle, elevation, calcPoints, pointHint, chDisable, weighting, edgeTraversal, algorithm, heading, headingPenalty, passThrough, roundTripDistance, roundTripSeed, alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor, alternativeRouteMaxShareFactor);
@SuppressWarnings("rawtypes") private com.squareup.okhttp.Call routeGetValidateBeforeCall(List<String> point, Boolean pointsEncoded, String key, String locale, Boolean instructions, String vehicle, Boolean elevation, Boolean calcPoints, List<String> pointHint, Boolean chDisable, String weighting, Boolean edgeTraversal, String algorithm, Integer heading, Integer headingPenalty, Boolean passThrough, Integer roundTripDistance, Long roundTripSeed, Integer alternativeRouteMaxPaths, Integer alternativeRouteMaxWeightFactor, Integer alternativeRouteMaxShareFactor, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'point' is set if (point == null) { throw new ApiException("Missing the required parameter 'point' when calling routeGet(Async)"); } // verify the required parameter 'pointsEncoded' is set if (pointsEncoded == null) { throw new ApiException("Missing the required parameter 'pointsEncoded' when calling routeGet(Async)"); } // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling routeGet(Async)"); } com.squareup.okhttp.Call call = routeGetCall(point, pointsEncoded, key, locale, instructions, vehicle, elevation, calcPoints, pointHint, chDisable, weighting, edgeTraversal, algorithm, heading, headingPenalty, passThrough, roundTripDistance, roundTripSeed, alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor, alternativeRouteMaxShareFactor, progressListener, progressRequestListener); return call; }
com.squareup.okhttp.Call call = routeGetValidateBeforeCall(point, pointsEncoded, key, locale, instructions, vehicle, elevation, calcPoints, pointHint, chDisable, weighting, edgeTraversal, algorithm, heading, headingPenalty, passThrough, roundTripDistance, roundTripSeed, alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor, alternativeRouteMaxShareFactor, null, null); Type localVarReturnType = new TypeToken<RouteResponse>(){}.getType(); return apiClient.execute(call, localVarReturnType);
Integer alternativeRouteMaxWeightFactor = null; Integer alternativeRouteMaxShareFactor = null; RouteResponse response = api.routeGet(point, pointsEncoded, key, locale, instructions, vehicle, elevation, calcPoints, pointHint, chDisable, weighting, edgeTraversal, algorithm, heading, headingPenalty, passThrough, roundTripDistance, roundTripSeed, alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor, alternativeRouteMaxShareFactor);
@SuppressWarnings("rawtypes") private com.squareup.okhttp.Call routeGetValidateBeforeCall(List<String> point, Boolean pointsEncoded, String key, String locale, Boolean instructions, String vehicle, Boolean elevation, Boolean calcPoints, List<String> pointHint, Boolean chDisable, String weighting, Boolean edgeTraversal, String algorithm, Integer heading, Integer headingPenalty, Boolean passThrough, List<String> details, Integer roundTripDistance, Long roundTripSeed, Integer alternativeRouteMaxPaths, Integer alternativeRouteMaxWeightFactor, Integer alternativeRouteMaxShareFactor, String avoid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'point' is set if (point == null) { throw new ApiException("Missing the required parameter 'point' when calling routeGet(Async)"); } // verify the required parameter 'pointsEncoded' is set if (pointsEncoded == null) { throw new ApiException("Missing the required parameter 'pointsEncoded' when calling routeGet(Async)"); } // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling routeGet(Async)"); } com.squareup.okhttp.Call call = routeGetCall(point, pointsEncoded, key, locale, instructions, vehicle, elevation, calcPoints, pointHint, chDisable, weighting, edgeTraversal, algorithm, heading, headingPenalty, passThrough, details, roundTripDistance, roundTripSeed, alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor, alternativeRouteMaxShareFactor, avoid, progressListener, progressRequestListener); return call; }
com.squareup.okhttp.Call call = routeGetValidateBeforeCall(point, pointsEncoded, key, locale, instructions, vehicle, elevation, calcPoints, pointHint, chDisable, weighting, edgeTraversal, algorithm, heading, headingPenalty, passThrough, roundTripDistance, roundTripSeed, alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor, alternativeRouteMaxShareFactor, null, null); Type localVarReturnType = new TypeToken<RouteResponse>(){}.getType(); return apiClient.execute(call, localVarReturnType);
@SuppressWarnings("rawtypes") private com.squareup.okhttp.Call routeGetValidateBeforeCall(List<String> point, Boolean pointsEncoded, String key, String locale, Boolean instructions, String vehicle, Boolean elevation, Boolean calcPoints, List<String> pointHint, Boolean chDisable, String weighting, Boolean edgeTraversal, String algorithm, Integer heading, Integer headingPenalty, Boolean passThrough, Integer roundTripDistance, Long roundTripSeed, Integer alternativeRouteMaxPaths, Integer alternativeRouteMaxWeightFactor, Integer alternativeRouteMaxShareFactor, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'point' is set if (point == null) { throw new ApiException("Missing the required parameter 'point' when calling routeGet(Async)"); } // verify the required parameter 'pointsEncoded' is set if (pointsEncoded == null) { throw new ApiException("Missing the required parameter 'pointsEncoded' when calling routeGet(Async)"); } // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling routeGet(Async)"); } com.squareup.okhttp.Call call = routeGetCall(point, pointsEncoded, key, locale, instructions, vehicle, elevation, calcPoints, pointHint, chDisable, weighting, edgeTraversal, algorithm, heading, headingPenalty, passThrough, roundTripDistance, roundTripSeed, alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor, alternativeRouteMaxShareFactor, progressListener, progressRequestListener); return call; }
ApiResponse<RouteResponse> resp = routeGetWithHttpInfo(point, pointsEncoded, key, locale, instructions, vehicle, elevation, calcPoints, pointHint, chDisable, weighting, edgeTraversal, algorithm, heading, headingPenalty, passThrough, details, roundTripDistance, roundTripSeed, alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor, alternativeRouteMaxShareFactor, avoid); return resp.getData();
com.squareup.okhttp.Call call = routeGetValidateBeforeCall(point, pointsEncoded, key, locale, instructions, vehicle, elevation, calcPoints, pointHint, chDisable, weighting, edgeTraversal, algorithm, heading, headingPenalty, passThrough, details, roundTripDistance, roundTripSeed, alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor, alternativeRouteMaxShareFactor, avoid, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<RouteResponse>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback);
ApiResponse<RouteResponse> resp = routeGetWithHttpInfo(point, pointsEncoded, key, locale, instructions, vehicle, elevation, calcPoints, pointHint, chDisable, weighting, edgeTraversal, algorithm, heading, headingPenalty, passThrough, roundTripDistance, roundTripSeed, alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor, alternativeRouteMaxShareFactor); return resp.getData();
com.squareup.okhttp.Call call = routeGetValidateBeforeCall(point, pointsEncoded, key, locale, instructions, vehicle, elevation, calcPoints, pointHint, chDisable, weighting, edgeTraversal, algorithm, heading, headingPenalty, passThrough, roundTripDistance, roundTripSeed, alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor, alternativeRouteMaxShareFactor, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<RouteResponse>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback);
com.squareup.okhttp.Call call = routeGetValidateBeforeCall(point, pointsEncoded, key, locale, instructions, vehicle, elevation, calcPoints, pointHint, chDisable, weighting, edgeTraversal, algorithm, heading, headingPenalty, passThrough, roundTripDistance, roundTripSeed, alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor, alternativeRouteMaxShareFactor, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<RouteResponse>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback);