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

Leaving out the locale param seems to give different results than explicitly setting locale=en #69

Closed
mlundblad opened this issue Aug 16, 2023 · 5 comments

Comments

@mlundblad
Copy link
Contributor

mlundblad commented Aug 16, 2023

I'm not sure this is the correct report to report issues with the geocoding API.

According to the API docs: https://docs.graphhopper.com/#tag/Geocoding-API
the locale param shall have the default value 'en', yet it seems these queries gives different results:

https://graphhopper.com/api/1/geocode?limit=20&locale=en&key=API_KEY&point=59.863704493020094%2C17.639317368224624&location_bias_scale=0.5&q=primeke

https://graphhopper.com/api/1/geocode?limit=20&key=API_KEY&point=59.863704493020094%2C17.639317368224624&location_bias_scale=0.5&q=primeke

The first query finds our office, while the latter doesn't.

@mlundblad
Copy link
Contributor Author

Leaving out the lang param in the Photon query seems to give the same result as with lang=en:

https://photon.komoot.io/api/?q=primeke&lat=59.863704493020094&lon=17.639317368224624

@karussell
Copy link
Member

Can you try with curl? With the browser it uses the Accept-Language header.

@mlundblad
Copy link
Contributor Author

Yeah, that's right, with curl https://photon.komoot.io/api/?q=primeke&lat=59.863704493020094&lon=17.639317368224624 gives the same result as the one without locale using the GH geocoder interface (e.g. with one result for "Primekens Kopf" in Finnentrop.

@karussell
Copy link
Member

Have created: komoot/photon#746

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

No branches or pull requests

2 participants