Skip to content

Commit 9bb101c

Browse files
committed
Stop adding vehicle to requests
1 parent 8bc94ed commit 9bb101c

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

client-hc/src/main/java/com/graphhopper/api/GHMatrixAbstractRequester.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ protected JsonNode createPostRequest(GHMRequest ghRequest, Collection<String> ou
102102

103103
putStrings(requestJson, "snap_preventions", ghRequest.getSnapPreventions());
104104
putStrings(requestJson, "out_arrays", outArraysList);
105-
requestJson.put("vehicle", ghRequest.getHints().getString("vehicle", ""));
106105
// requestJson.put("elevation", ghRequest.getHints().getBool("elevation", false));
107106
requestJson.put("fail_fast", ghRequest.getFailFast());
108107

client-hc/src/main/java/com/graphhopper/api/GraphHopperWeb.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ public GraphHopperWeb(String serviceUrl) {
106106
ignoreSet.add("algorithm");
107107
ignoreSet.add("locale");
108108
ignoreSet.add("point");
109-
ignoreSet.add("vehicle");
110109

111110
// some are special and need to be avoided
112111
ignoreSet.add("points_encoded");
@@ -318,10 +317,6 @@ private Request createGetRequest(GHRequest ghRequest) {
318317
+ "&elevation=" + tmpElevation
319318
+ "&optimize=" + tmpOptimize;
320319

321-
if (ghRequest.getHints().has("vehicle")) {
322-
url += "&vehicle=" + ghRequest.getHints().getString("vehicle", "");
323-
}
324-
325320
for (String details : ghRequest.getPathDetails()) {
326321
url += "&" + Parameters.Details.PATH_DETAILS + "=" + details;
327322
}

client-hc/src/test/java/com/graphhopper/api/Examples.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public void routing() {
3737
addPoint(new GHPoint(49.6724, 11.3494)).
3838
addPoint(new GHPoint(49.6550, 11.4180));
3939
// Set vehicle like car, bike, foot, ...
40+
// todonow: change to profile?
4041
req.putHint("vehicle", "bike");
4142
// Optionally enable/disable elevation in output PointList, currently bike and foot support elevation, default is false
4243
req.putHint("elevation", false);
@@ -94,6 +95,7 @@ public void matrix() {
9495
GHMRequest ghmRequest = new GHMRequest();
9596
ghmRequest.addOutArray("distances");
9697
ghmRequest.addOutArray("times");
98+
// todonow: change to profile?
9799
ghmRequest.putHint("vehicle", "car");
98100

99101
// init points for a symmetric matrix

client-hc/src/test/java/com/graphhopper/api/GraphHopperWebTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public void testGetClientForRequest(boolean usePost) {
1919
GHRequest req = new GHRequest().
2020
addPoint(new GHPoint(42.509225, 1.534728)).
2121
addPoint(new GHPoint(42.512602, 1.551558)).
22+
// todonow: change to profile?
2223
putHint("vehicle", "car");
2324
req.putHint(GraphHopperWeb.TIMEOUT, 5);
2425

0 commit comments

Comments
 (0)