Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing profile for ORS requests #69

Open
mbogner opened this issue Nov 26, 2023 · 4 comments
Open

missing profile for ORS requests #69

mbogner opened this issue Nov 26, 2023 · 4 comments
Labels

Comments

@mbogner
Copy link

mbogner commented Nov 26, 2023

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
Copy link
Contributor

jcoupey commented Nov 27, 2023

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
Copy link
Author

mbogner commented Dec 11, 2023

Having it documented and configurable would be great.

@jcoupey
Copy link
Contributor

jcoupey commented Dec 12, 2023

Happy to review a PR introducing a configurable default profile!

@mbogner
Copy link
Author

mbogner commented Dec 12, 2023

Let's see if I find time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants