Found a handy python implementation here - so I set about porting it over to C#
Github repo can be found here
The project is a portable class library - so should work just as well for your Xamarin projects.
Sample usage:
var service = new CountryReverseGeocodeService();
var angola = new GeoLocation { Latitude = 12.437329, Longitude = -4.895250 };
LocationInfo info = service.FindCountry(angola);
var alaska = new GeoLocation { Latitude = -170.333949, Longitude = 63.431027 };
LocationInfo info = _service.FindUsaState(alaska);
hope this spares someone else a few hours implementation ;)
No comments:
Post a Comment