public static void LoadMapItem(this CLLocation self, MapItemLoadCompletionHandler completionHandler) { var geocoder = new CLGeocoder(); geocoder.ReverseGeocodeLocation(self, (placemarks, error) => { if (placemarks == null) { completionHandler(null, error); return; } if (placemarks.Length == 0) { completionHandler(null, error); return; } var mkPlacement = new MKPlacemark(placemarks[0].Location.Coordinate); completionHandler(new MKMapItem(mkPlacement), null); }); }
static public CLPlacemark GetPlacemark(CLLocation location, string name, CNPostalAddress postalAddress) { return((null as CLPlacemark)._GetPlacemark(location, name, postalAddress)); }
public static BuddyGeoLocation ToBuddyGeoLocation(this CoreLocation.CLLocation loc) { return(new BuddyGeoLocation(loc.Coordinate.Latitude, loc.Coordinate.Longitude)); }