Problem/Motivation

Autocomplete suggestions include all addresses world-wide even when a country has been selected. This results in a poor experience with autocomplete providers that work internationally.

Proposed resolution

Include the country in the address query and ensure suggestions are filtered

Comments

rhovland created an issue. See original summary.

Jonah@ProCycle’s picture

Patch with just the changes to filter by country from #3194599: Fix mapbox integration and changes google maps to filter by country. Changes to mapbox are not included.

socialnicheguru’s picture

Status: Active » Needs review
granik’s picture

Status: Needs review » Needs work
StatusFileSize
new12.47 KB

@Jonah@ProCycle, there is a strange behavior after applying the patch from #2. The field suggests just a country name if no address found.
See the screenshot.
address suggestion's strange behavior

rhovland’s picture

@granik This is expected because the patch is implicitly setting the country based on what is currently selected. So an autocomplete provider with no suggestions would only suggest the country if it can't match anything else because that's all that has been provided to it.

This probably needs to be fixed in the autocomplete provider you're using so it doesn't return any results where only a country is offered as a result.
Which autocomplete provider are you seeing this result in?

gilmord’s picture

If you check how Geolocation + Address works - once you set the point on the map - address country is updated
Looks like this is the best option - instead of forcing the user to handle address it should be handled based on provider response

rhovland’s picture

Status: Needs work » Closed (outdated)

This is no longer applicable to the google maps plugin as it filters by country now. As there was no input provided if this effects other providers going to close this. Please reopen if this affects you.