Muhammad Rehan Saeed Muhammad Rehan Saeed - 9 months ago 99
C# Question

Equivelant of .NET GeoCoordinate.GetDistanceTo in Windows 8 Metro style Apps

What is the equivelant of the System.Device.Location.GeoCoordinate.GetDistanceTo method in Metro style Windows 8 Applications.

Metro applications have the Geocoordinate class (With a lower case 'C') but no GetDistanceTo method.

Secondly, the Metro Geocoordinate class has no constructor. How can I create an instance of it.

Answer Source

The Metro Geocoordinate has no public constructor for some reason. The best way to implement this in my opinion is to use Reflector and copy the implementation of System.Device.Location.GeoCoordinate which will also give you GetDistanceTo.

Hopefully this will be re-added to the API at a later time.