I would like to make an App that will have some locations and i would like to know if i am near any of them and to display for example how far away i am using any provider available preferably WiFi or Cellural data (i dont care much about accuracy).
How i can do that on Xamarin.Android?
For finding out my location i believe this article https://developer.xamarin.com/guides/android/platform_features/maps_and_location/location/ will be good enough but how i can compare a location with other locations and find out the difference in meters between them?
You get two values for a location: Latitude and Longitude. For the math, calculating the distance "as-the-crow-flies" between two locations, ask Google. I believe there are plenty of algorithms for that.
Answers
You get two values for a location: Latitude and Longitude. For the math, calculating the distance "as-the-crow-flies" between two locations, ask Google. I believe there are plenty of algorithms for that.
oh that simple?
nice, will try it and post back, thanks
Hi,
This is the solution which worked for me.
I used Xamaarin.Essentials library.
This will return all the locations with Orderby learest to the source location.