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

avoid[features] not working for routing v8 #75

Closed
zaksuo opened this issue Sep 8, 2023 · 3 comments · Fixed by #82
Closed

avoid[features] not working for routing v8 #75

zaksuo opened this issue Sep 8, 2023 · 3 comments · Fixed by #82

Comments

@zaksuo
Copy link

zaksuo commented Sep 8, 2023

Hello there,

I struggled for a while figuring out why the parameters I was passing to avoid tollTransponders and tollRoads weren't working.
After debugging a bit and printing requests sent to Here routing API, I figured out that the avoid parameter wasn't recognized :

{"notices":[{"title":"The provided parameter 'avoid=%7B%27%5Bfeatures%5D%27%3A+%27controlledAccessHighway%2Ctunnel%27%7D' is unknown.","code":"unknownParameter","severity":"info"},{"title":"The provided parameter 'truck=%7B%27%5Bfeatures%5D%27%3A+%27controlledAccessHighway%2Ctunnel%27%7D' is unknown.","code":"unknownParameter","severity":"info"}],

For now I did some quick & dirty fixes in the library, changing this parameters to plain text to make it work and send requests formatted like this :

https://router.hereapi.com/v8/routes?transportMode=truck&origin=48.9048418,2.306274&destination=48.7985884,1.6674979&apiKey=XXXXXXXXXX&departureTime=2021-09-28T10:30:00+00:00&routingMode=short&avoid[features]=controlledAccessHighway,tunnel&units=metric&lang=fr-FR&return=summary,tolls

In the Here documentation, avoidance parameters are given like this :

&avoid[features]=tollRoad

But i'm not able to find any request example with multiple avoidance types with features/tollTransponders/segments/etc. After testing it seems that they have to appear as specific parameters like this :

&avoid[features]=controlledAccessHighway,tunnel,tollRoad&avoid[tollTransponders]=all

It would be great to have an official update on this if you have some time !

Thanks

@abdullahselek
Copy link
Owner

Hi @zaksuo thanks for opening this issue. I tried to run sample code available under examples folder within routing_api.py and it worked well. I would need more details about your problem, provide me your python code that calls the route_v8 of routing_api with details.

@maciej-wichowski
Copy link
Contributor

Hello @abdullahselek . It seems to me, that the problem occurs for exclude and truck parameters. They are omitted, because of incorrect variable used (avoid instead of exclude or truck) [1], [2]

@maciej-wichowski
Copy link
Contributor

I have prepared PR for this issue #82

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

Successfully merging a pull request may close this issue.

3 participants