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

[BUG] Proximity parameter is ignored #84

Open
dnywh opened this issue Jan 15, 2025 · 0 comments
Open

[BUG] Proximity parameter is ignored #84

dnywh opened this issue Jan 15, 2025 · 0 comments
Assignees

Comments

@dnywh
Copy link

dnywh commented Jan 15, 2025

Describe the bug
Passing a proximity query parameter has no effect on the forward geocoding search results.

To Reproduce
This can be reproduced on MapTiler's own geocoding demo page which (I think) uses the React component.

Here's how to test this manually:

  1. Create a search query vague enough to have results all over the world. Do this without specifying proximity. I assume this falls back on some kind of ranking and/or server-geolocation. Make note of the search results (features) and their ranking. For example:
    https://api.maptiler.com/geocoding/Mary.json?key=${apiKey}

  2. Run the search query again, this time specifying coordinates on the other side of the world. Note that the search results are identical as above. For example:
    https://api.maptiler.com/geocoding/Mary.json?proximity=7.098955%2C50.736281&key=${apiKey}

  3. Run the search query again, this time using fixed coordinates close to home. Note the search results are the same. For example:
    https://api.maptiler.com/geocoding/Mary.json?proximity=153.080353%2C-27.457043&key=${apiKey}

Expected behavior
The search results should respect the proximity rules: the results should be biased towards the provided [lon, lat].

Put simply: The results should differ depending on which coordinates I pass in the proximity parameter.

Screenshots

Test 1 Test 2 Test 3
test-1 test-2 test-3

Additional context
I've used "Mary" as my test search term as there are places across the UK, the US, and Australia (and elsewhere) that start with that term. I'm in Australia (quite close to a town called Maryborough) so would expect the Australian one(s) to show first. Note in the screenshots that the ranked results are instead always:

  1. Maryland, United States
  2. Mary, Turkmenistan
  3. Portlaoise, The Municipal District of Portlaoise, Ireland
  4. Maryborough, Queensland, Australia
  5. Maryino District, Moscow, Russia

Another good test is "Melbourne". There is a city in both the USA and in Australia with that name. Specifying proximity coordinates that are in either country has no effect on the results.

See also #11 from 2023, reporting something similar.

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

No branches or pull requests

2 participants