Windows phone getting nearby latitude and longitude within 6 Kilometer based on my lat and long
-
21-12-2019 - |
Question
people with the same app, register their location every time they open the app, people that register the location within a 6 Kilometers can see each other based on what my app does. I'm not using a map, just lat and long values, but its okay for a demo, so is there any algorithm that can do this ? please help me ! thanks.
Solution
A little while ago this would have involved a lot of trigonometry. With the latest version of .NET however you can use the GeoCoordinate.GetDistanceTo() method.
double distance = myLocation.GetDistanceTo(yourLocation); // metres
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow