CLGeocoder.GeocodeAddressAsync 方法

定义

重载

GeocodeAddressAsync(String, CLRegion, NSLocale)
GeocodeAddressAsync(String, CLRegion)

从人类可读地址和区域请求纬度/经度位置。

GeocodeAddressAsync(String)
GeocodeAddressAsync(NSDictionary)

开发人员不应使用此已弃用的方法。 开发人员应改用“GeocodeAddress (string, CLRegion, NSLocale, CLGeocodeCompletionHandler) ”。

GeocodeAddressAsync(String, CLRegion, NSLocale)

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 4, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 13, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual System.Threading.Tasks.Task<CoreLocation.CLPlacemark[]> GeocodeAddressAsync (string addressString, CoreLocation.CLRegion region, Foundation.NSLocale locale);
abstract member GeocodeAddressAsync : string * CoreLocation.CLRegion * Foundation.NSLocale -> System.Threading.Tasks.Task<CoreLocation.CLPlacemark[]>
override this.GeocodeAddressAsync : string * CoreLocation.CLRegion * Foundation.NSLocale -> System.Threading.Tasks.Task<CoreLocation.CLPlacemark[]>

参数

addressString
String
region
CLRegion
locale
NSLocale

返回

属性

适用于

GeocodeAddressAsync(String, CLRegion)

从人类可读地址和区域请求纬度/经度位置。

public virtual System.Threading.Tasks.Task<CoreLocation.CLPlacemark[]> GeocodeAddressAsync (string addressString, CoreLocation.CLRegion region);
abstract member GeocodeAddressAsync : string * CoreLocation.CLRegion -> System.Threading.Tasks.Task<CoreLocation.CLPlacemark[]>
override this.GeocodeAddressAsync : string * CoreLocation.CLRegion -> System.Threading.Tasks.Task<CoreLocation.CLPlacemark[]>

参数

addressString
String
region
CLRegion

返回

一个表示异步地理编码操作的任务。

适用于

GeocodeAddressAsync(String)

public virtual System.Threading.Tasks.Task<CoreLocation.CLPlacemark[]> GeocodeAddressAsync (string addressString);
abstract member GeocodeAddressAsync : string -> System.Threading.Tasks.Task<CoreLocation.CLPlacemark[]>
override this.GeocodeAddressAsync : string -> System.Threading.Tasks.Task<CoreLocation.CLPlacemark[]>

参数

addressString
String

返回

表示异步 GeocodeAddress 操作的任务。 TResult 参数 CLGeocodeCompletionHandler的值为 。

注解

var addressString = "2 Park Plaza, Boston, MA, USA 02116";
var geocoder = new CLGeocoder();
var taskCoding = geocoder.GeocodeAddressAsync(addressString);
taskCoding.ContinueWith((addresses) => {
	foreach(var address in addresses.Result)
	{
		Console.WriteLine(address);
	}
});              

适用于

GeocodeAddressAsync(NSDictionary)

开发人员不应使用此已弃用的方法。 开发人员应改用“GeocodeAddress (string, CLRegion, NSLocale, CLGeocodeCompletionHandler) ”。

[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.WatchOS, 4, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'GeocodeAddress (string, CLRegion, NSLocale, CLGeocodeCompletionHandler)' instead.")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'GeocodeAddress (string, CLRegion, NSLocale, CLGeocodeCompletionHandler)' instead.")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.MacOSX, 10, 13, ObjCRuntime.PlatformArchitecture.None, "Use 'GeocodeAddress (string, CLRegion, NSLocale, CLGeocodeCompletionHandler)' instead.")]
public virtual System.Threading.Tasks.Task<CoreLocation.CLPlacemark[]> GeocodeAddressAsync (Foundation.NSDictionary addressDictionary);
abstract member GeocodeAddressAsync : Foundation.NSDictionary -> System.Threading.Tasks.Task<CoreLocation.CLPlacemark[]>
override this.GeocodeAddressAsync : Foundation.NSDictionary -> System.Threading.Tasks.Task<CoreLocation.CLPlacemark[]>

参数

addressDictionary
NSDictionary

要提交的通讯簿字典

返回

表示异步 GeocodeAddress 操作的任务。 TResult 参数 CLGeocodeCompletionHandler的值为 。

属性

适用于