VROOM-Project / vroom-frontend

Web frontend for VROOM
http://map.vroom-project.org/
BSD 2-Clause "Simplified" License
28 stars 30 forks source link

missing profile for ORS requests #69

Open mbogner opened 11 months ago

mbogner commented 11 months ago

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
    }
};
jcoupey commented 11 months ago

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.

mbogner commented 11 months ago

Having it documented and configurable would be great.

jcoupey commented 10 months ago

Happy to review a PR introducing a configurable default profile!

mbogner commented 10 months ago

Let's see if I find time :)