vroom-frontend icon indicating copy to clipboard operation
vroom-frontend copied to clipboard

missing profile for ORS requests

Open mbogner opened this issue 1 year ago • 4 comments

When using ORS requests need to use profile "driving-car" instead of default "car". Otherwise this results in a 400 response with the message that profile "car" doesn't exist which is correct because ORS named it "driving-car".

This fixed the issue for me though it is specific for ORS and fixes all cars to the same profile (which not adding one does as well):

var vehicles = JSON.parse(JSON.stringify(dataHandler.getVehicles()));
for (let i = 0; i < vehicles.length; i++) {
    vehicles[i].profile = 'driving-car';
}
var input = {
    jobs: JSON.parse(JSON.stringify(dataHandler.getJobs())),
    shipments: JSON.parse(JSON.stringify(dataHandler.getShipments())),
    vehicles: vehicles,
    "options": {
        "g": true
    }
};

mbogner avatar Nov 26 '23 14:11 mbogner

That's correct, we don't have a notion of profile in this frontend, it only works out of the box with OSRM, relying on the fact that car is the default there.

Not sure whether we should do anything about it, except maybe make that default explicit and easy to adjust in a config file somewhere.

jcoupey avatar Nov 27 '23 15:11 jcoupey

Having it documented and configurable would be great.

mbogner avatar Dec 11 '23 23:12 mbogner

Happy to review a PR introducing a configurable default profile!

jcoupey avatar Dec 12 '23 08:12 jcoupey

Let's see if I find time :)

mbogner avatar Dec 12 '23 08:12 mbogner