This PR restricts autocomplete suggestions to only include US locations. This is in addition to the code which biases results to near your location, since that existing bias doesn't actually prevent international addresses from being suggested.
I was also considering changing the bounds to a static rect of Chicago instead of getting them from the user or at least defaulting to that. But TBH this change alone has already fixed most of the issue that I was experiencing so that may be unnecessary.
Here are two examples to illustrate:
Suggestions for "My Position"
Suggestions for "is"
And here's what those two look like after my change
No suggestions for "My position" (as it should be)
This PR restricts autocomplete suggestions to only include US locations. This is in addition to the code which biases results to near your location, since that existing bias doesn't actually prevent international addresses from being suggested.
I was also considering changing the bounds to a static rect of Chicago instead of getting them from the user or at least defaulting to that. But TBH this change alone has already fixed most of the issue that I was experiencing so that may be unnecessary.
Here are two examples to illustrate:
Suggestions for "My Position"
Suggestions for "is"
And here's what those two look like after my change
No suggestions for "My position" (as it should be)
Better results for "is"