GeoCoordinate Portable Released


1 minute read - suggest an edit

It has always irked me that System.Device.Location.GeoCoordinate was never included in any portable class library profiles. I mean, it’s a type that is used all the freaking time when doing any form of mobile development involving mapping or location services. There’s a open ticket on UserVoice requesting for it to be implemented, but until that happens pretty much every Xamarin/UWP developer out there is copy and pasting their own implementation/interpretation of the class between their applications.

Enough of this madness, today I’m releasing a 1:1 exact API compliant implementation and which will be supported until MSFT sees it fit to include the type by default. The thoery is if you take this package as a dependency, when/if MSFT embeds the type you will be able to uninstall the library and everything will still work after deleting all of the using GeoCoordinatePortable; references.

Supported Platforms

  • Mono
  • .NET 4.5
  • .NET Core
  • Windows Phone 8.x
  • Universal Windows Platform
  • Xamarin iOS
  • Xamarin Android

Installation

Installation is done via NuGet:

PM> Install-Package GeoCoordinate

Usage

GeoCoordinate pin1 = new GeoCoordinate(lat, lng);
GeoCoordinate pin2 = new GeoCoordinate(lat, lng);

double distanceBetween = pin1.GetDistanceTo(pin2);

For more examples, refer to the MSDN reference documentation over at: https://msdn.microsoft.com/en-us/library/system.device.location.geocoordinate(v=vs.110).aspx

Related Posts

ReactiveUI v7.2.0 released

Learn these three buttons

Announcing ReactiveUI virtual community meetups

ReactiveUI v7.1.0 released

ReactiveUI v7.0.0 released

Semantic Versioning of Xamarin Applications

Announcing Serilog.Sinks.Xamarin

Announcing Cake.Raygun

Announcing Cake.AppleSimulator

Example of Xamarin iOS with Cake