diff options
Diffstat (limited to 'Xamarin.Forms.Maps.MacOS.Extra/ApiDefinition.cs')
-rw-r--r-- | Xamarin.Forms.Maps.MacOS.Extra/ApiDefinition.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Xamarin.Forms.Maps.MacOS.Extra/ApiDefinition.cs b/Xamarin.Forms.Maps.MacOS.Extra/ApiDefinition.cs new file mode 100644 index 00000000..c6a92d91 --- /dev/null +++ b/Xamarin.Forms.Maps.MacOS.Extra/ApiDefinition.cs @@ -0,0 +1,33 @@ +using CoreLocation; +using Foundation; + +namespace Xamarin.Forms.Maps.MacOS.Extra +{ + delegate void CLGeocodeCompletionHandler(CLPlacemark[] placemarks, NSError error); + + [BaseType(typeof(NSObject))] + interface CLGeocoder + { + [Export("isGeocoding")] + bool Geocoding { get; } + + [Export("reverseGeocodeLocation:completionHandler:")] + [Async] + void ReverseGeocodeLocation(CLLocation location, CLGeocodeCompletionHandler completionHandler); + + [Export("geocodeAddressDictionary:completionHandler:")] + [Async] + void GeocodeAddress(NSDictionary addressDictionary, CLGeocodeCompletionHandler completionHandler); + + [Export("geocodeAddressString:completionHandler:")] + [Async] + void GeocodeAddress(string addressString, CLGeocodeCompletionHandler completionHandler); + + [Export("geocodeAddressString:inRegion:completionHandler:")] + [Async] + void GeocodeAddress(string addressString, CLRegion region, CLGeocodeCompletionHandler completionHandler); + + [Export("cancelGeocode")] + void CancelGeocode(); + } +} |