After creating GHRequest with coordinates, details parameters, etc. and want to send it via GraphhopperWebClient to the server, I get an error that says:
The requested profile 'name=car|vehicle=car|weighting=fastest|turnCosts=false|hints={}' does not exist.
Available profiles: [foot, car, bike]]
I am creating GHRequest in this way:
(1) Here I will read parameters and insert informations such as point coordinates, details... in GHRequest:
GHRequest ghRequest = getGHRequest(
param0,
param1,
param2
);
(2) Then I will create Profile for the GHRequest:
Profile profile = new Profile("car")
.setVehicle("car")
.setWeighting("false")
.setTurnCosts(false);
(3) At the end, I will set GHRequest's profile:
ghRequest.setProfile(ghProfile.toString());
My next step is to use GraphhopperWebClient to send the request on my server that has Graphhopper instance running on it:
(4) I will create GraphhopperWeb client instance with my server address:
GraphHopperWeb client = new GraphHopperWeb("http:baseURL/route");
client.setPostRequest(false);
(5) I am sending created GHRequest on the server and parseing the response in GHResponse:
GHResponse response = client.route(ghRequest);
I don't need to insert my key because Graphhopper is running on my server and I just need to send a GET request on it and parse the response.
Can someone help me to solve this problem?