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

"countrycodes" option broken with array #257

Closed
immanuel-h opened this issue Sep 2, 2022 · 2 comments
Closed

"countrycodes" option broken with array #257

immanuel-h opened this issue Sep 2, 2022 · 2 comments

Comments

@immanuel-h
Copy link

Config: countrycodes: ["at", "de"] (as per doc, array of iso country codes)

Expected: URL generated as countrycodes=at,de

Actual: Url generated as 0=at&1=de

Source of the problem: toQueryString method

Minimal test case

toQueryString({countrycodes:["at", "de"]})
> '0=at&1=de'

Workaround: using a comma-separated string instead of an array (i.e. countrycodes:"at,de")

If this is intended behavior the docs should be updated.

@Dominique92
Copy link
Owner

The nominatim doc specifies string separated with commas countrycodes: 'US,FR'

What doc should be updated ?

@mtmail
Copy link
Contributor

mtmail commented Aug 31, 2023

countrycodes=at,de is correct. Uppercase works but inside the Nominatim database the codes are stored lowercase so we usually write them lowercase in documentation.

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

3 participants