CLGeocoder.GeocodeAddressAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
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
傳回
Task<CLPlacemark[]>
- 屬性
適用於
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
傳回
Task<CLPlacemark[]>
代表非同步地理編碼作業的工作。
適用於
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
傳回
Task<CLPlacemark[]>
表示非同步 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
要提交的通訊錄字典
傳回
Task<CLPlacemark[]>
表示非同步 GeocodeAddress 作業的工作。 TResult 參數的值是 CLGeocodeCompletionHandler 。
- 屬性