Closed karussell closed 7 years ago
I need the route's profile in the solution as we also need the actual locations. Therefore, I attached the vehicle's profile to the solution here: https://github.com/graphhopper/directions-api-js-client/blob/master/js/GraphHopperOptimization.js#L184
The profile itself is retrieved from the vehicles. However, if a vehicle does not have any reference to a type, the default profile is assigned.
Still do not understand why a profile is necessary and a default profile should be handled server side.
Do you mean we need this for e.g. the Routing API?
The vrp solution does not come with the actual routes. However, if we want to show them on a map, we need to make another routing request to gh-routing. And this is where we need the profile.
Ok, it seems to me that this is indeed necessary to do this post processing. Including the profile in the response JSON wouldn't make sense as we have the vehicle_id and the user can inject by himself, as he would do for any other information too.
Still we should make it possible in the API to include the routes directly where the fetching is done behind the scenes.
This is already fixed? @oblonski
Hmmh, I can see you've included a fix for this. Would you mind to explain? Or can we make this more explicit e.g. call profile just tspProfile as the profile is only use for this or defaultProfile if nothing is specified. If it is just as default then I would like to avoid this as we (should) handle this on the server side.