Search code examples
xamarinlocalizationxamarin.formspositioncompare

How to sort a List<Position> to be from closest to furthest? Xamarin Forms


I'm looking for a plugin to sort a list of Positions (every position includes latitude and longitude) from the closest to my current position to the furthest, but I couldn't find anything that may be helpful yet.


Solution

  • If you want to do properly, see the equations on this page http://www.movable-type.co.uk/scripts/latlong.html Then do as SushiHangover says on the result