You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I´m trying to use Geocoding to validate if an address the user enters is correct.
I´m using Geocoding.Default.GetLocationsAsync with an address as a string to do so.
This works pretty well, but I got one problem.
When a user enters a correct street, zip and city, but a "wrong" country, GetLocationsAsync returns a location based on the street, zip and city and ignores the country. It shouldn´t find a location.
The code looks like this:
var locations = await Geocoding.Default.GetLocationsAsync($"{address.AddressLine1} {address.Zip} {address.City} {address.CountryCode}");
CountryCode is the ISO2 code of the selected country.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello.
I´m trying to use Geocoding to validate if an address the user enters is correct.
I´m using Geocoding.Default.GetLocationsAsync with an address as a string to do so.
This works pretty well, but I got one problem.
When a user enters a correct street, zip and city, but a "wrong" country, GetLocationsAsync returns a location based on the street, zip and city and ignores the country. It shouldn´t find a location.
The code looks like this:
var locations = await Geocoding.Default.GetLocationsAsync($"{address.AddressLine1} {address.Zip} {address.City} {address.CountryCode}");
CountryCode is the ISO2 code of the selected country.
Am I doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions