你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

MapsSearchClient.SearchPointOfInterestAsync 方法

定义

兴趣点 (POI) 搜索允许按名称请求 POI 结果。 搜索支持其他查询参数,例如语言和按国家/地区或边界框驱动的兴趣区域筛选结果。 终结点将仅返回与查询字符串匹配的 POI 结果。 响应包括 POI 详细信息,例如地址、一对坐标位置和类别。

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Maps.Search.Models.SearchAddressResult>> SearchPointOfInterestAsync (string query, bool? IsTypeAhead = default, Azure.Maps.Search.OperatingHoursRange? OperatingHours = default, Azure.Core.GeoJson.GeoBoundingBox BoundingBox = default, Azure.Maps.Search.SearchPointOfInterestOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SearchPointOfInterestAsync : string * Nullable<bool> * Nullable<Azure.Maps.Search.OperatingHoursRange> * Azure.Core.GeoJson.GeoBoundingBox * Azure.Maps.Search.SearchPointOfInterestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Maps.Search.Models.SearchAddressResult>>
override this.SearchPointOfInterestAsync : string * Nullable<bool> * Nullable<Azure.Maps.Search.OperatingHoursRange> * Azure.Core.GeoJson.GeoBoundingBox * Azure.Maps.Search.SearchPointOfInterestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Maps.Search.Models.SearchAddressResult>>
Public Overridable Function SearchPointOfInterestAsync (query As String, Optional IsTypeAhead As Nullable(Of Boolean) = Nothing, Optional OperatingHours As Nullable(Of OperatingHoursRange) = Nothing, Optional BoundingBox As GeoBoundingBox = Nothing, Optional options As SearchPointOfInterestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of SearchAddressResult))

参数

query
String

要搜索的 POI 名称 (,例如“自由女神像”、“星巴克”) ,必须正确编码 URL。

IsTypeAhead
Nullable<Boolean>

布尔值。 如果设置了 typeahead 标志,则查询将被解释为部分输入,并且搜索将进入预测模式。

OperatingHours
Nullable<OperatingHoursRange>

POI (兴趣点) 的运行时间。 运行小时数的可用性将因可用数据而异。 如果未通过,则不会返回营业时间信息。

BoundingBox
GeoBoundingBox

边界框

options
SearchPointOfInterestOptions

其他选项

cancellationToken
CancellationToken

要使用的取消标记。

返回

适用于