CoreLocation.CLGeocoder Class
Provides support for converting between an address in text form and a location described using latitude and longitude or to convert from a latitue and longitude to a user-friendly location (street, city, state, country).

See Also: CLGeocoder Members

Syntax

[Foundation.Register("CLGeocoder", true)]
[ObjCRuntime.Availability(Introduced=ObjCRuntime.Platform.iOS_5_0)]
public class CLGeocoder : Foundation.NSObject

Remarks

Converting a latitude and longitude into a human-readable address is generally straightforward:

C# Example

async void GeocodeToConsoleAsync (string address) {
    var geoCoder = new CLGeocoder();
    var placemarks = await geoCoder.GeocodeAddressAsync(address);
    foreach (var placemark in placemarks) {
	      Console.WriteLine(placemark);
    }   

As is reverse-geocoding:

C# Example

async void ReverseGeocodeToConsoleAsync (CLLocation location) {
    var geoCoder = new CLGeocoder();
    var placemarks = await geoCoder.ReverseGeocodeLocationAsync(location);
    foreach (var placemark in placemarks) {
	      Console.WriteLine(placemark);
    }          
}
          

Related content

Requirements

Namespace: CoreLocation
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0