-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
Google & Bing Autocomplete results differ from actual services #182
Comments
No idea, we simply pas the arguments to the providers api endpoint. Perhaps it's because we use the searching api for auto completion, and not a dedicated auto completion api? Can you get the "correct" predictions when you query the endpoint directly? https://developers.google.com/maps/documentation/geocoding/intro#ComponentFiltering |
Hi Stephan, Thank you for replying on such short notice. I've tried several endpoints, with various results. I have a hard time wrapping my head around it.
I reckon it will be hard to get this working for all/most providers, but at least Google would be really nice. Thanks |
If I look at the So yes. Definitely something we could improve/implement. But also something that will require some work. We need to separate autocompletion / geocoding logic for the providers that have a separate autocompletion api. A PR is most welcome. |
@smeijer, I am trying to integrate the geocoding on leaflet map. It is the searching result of leaflet: And it is the result of searching using google map: As you can see the getting addresses are different from each other even though the same position. |
Those are different providers, which treat search queries differently. We can't control that. It's like using Google or Bing. Those return different search results on the same input. That being said, when I compare both providers on this specific input, I'm having a very close match. The difference is just a few meters. So I'm not sure what exactly the problem is that you're experiencing. The only provider messing up this query, is the Esri provider. You can try it on https://smeijer.github.io/leaflet-geosearch |
@pixels-for-breakfast , I've looked into your issue. And I think I've located it. The results you're referring to, are using the We could change that, to use the I'm a bit hesitant about doing that.
|
@smeijer That works for me. And currently, I have another issue now using React leaflet map. So I am going to add the geo address in the marker tooltip below. How can I integrate it? |
Hi,
Technically the autocomplete works quite well; it shows suggestions, even when I in some (not all) cases manage to apply a countrycode to narrow down the results. But the issue is that the results that are shown differ from the results that I get when searching on Google Maps or Bing Maps. This can be seen in the demo aswel. It only returns exact matches. Ie. searching for 'ber' will return a village called Bér in Hungary, or Ber in Senegal, India or Nepal. 'Berlin' on the other hand is not one of the results...
Any idea why this happens? Can it be fixed somehow?
Thanks
The text was updated successfully, but these errors were encountered: