GeocodingExtensions.GetPlacemarksAsync(IGeocoding, Location) 方法

定义

检索指定 Location给定位置的潜在地标。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<System::Collections::Generic::IEnumerable<Microsoft::Maui::Devices::Sensors::Placemark ^> ^> ^ GetPlacemarksAsync(Microsoft::Maui::Devices::Sensors::IGeocoding ^ geocoding, Microsoft::Maui::Devices::Sensors::Location ^ location);
public static System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Maui.Devices.Sensors.Placemark>> GetPlacemarksAsync (this Microsoft.Maui.Devices.Sensors.IGeocoding geocoding, Microsoft.Maui.Devices.Sensors.Location location);
static member GetPlacemarksAsync : Microsoft.Maui.Devices.Sensors.IGeocoding * Microsoft.Maui.Devices.Sensors.Location -> System.Threading.Tasks.Task<seq<Microsoft.Maui.Devices.Sensors.Placemark>>
<Extension()>
Public Function GetPlacemarksAsync (geocoding As IGeocoding, location As Location) As Task(Of IEnumerable(Of Placemark))

参数

geocoding
IGeocoding

调用此方法时所针对的对象。

location
Location

一个 Location 实例,用于查找附近的地标。

返回

Placemark最匹配坐标的列表;null如果未找到任何地点标记,则为 。

例外

locationnull 时,将引发此异常。

适用于