Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Geocoder.GetPositionsForAddressAsync returns some strange results

$
0
0

I have found that the Geocoder.GetPositionsForAddressAsyn accepts some bad input yet returns a valid result.

For example, if I send it "a" as the address, it returns

48.3705449, 10.89779

which is the coordinates of Augsberg, Germany. It is true, this starts with "a". But that is hardly an acceptable result, especially given that the input will come from a user-filled entry.

I have found similar invalid addresses being resolved to coordinates.

"b" takes me to Visadar Gilan, Iran, which has no "b" in it, but I'm sure is a nice place.

I could go through the whole alphabet, but you get the idea.

Is there any way to get it to only accept reasonably valid addresses?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>