Udostępnij za pośrednictwem


MapsSearchClient.GetGeocodingAsync Method

Definition

In many cases, the complete search service might be too much, for instance if you are only interested in traditional geocoding. Search can also be accessed for address look up exclusively. The geocoding is performed by hitting the geocoding endpoint with just the address or partial address in question. The geocoding search index will be queried for everything above the street level data. No Point of Interest (POIs) will be returned. Note that the geocoder is very tolerant of typos and incomplete addresses. It will also handle everything from exact street addresses or street or intersections as well as higher level geographies such as city centers, counties, states etc.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Maps.Search.Models.GeocodingResponse>> GetGeocodingAsync (string query = default, Azure.Maps.Search.Models.GeocodingQuery options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetGeocodingAsync : string * Azure.Maps.Search.Models.GeocodingQuery * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Maps.Search.Models.GeocodingResponse>>
override this.GetGeocodingAsync : string * Azure.Maps.Search.Models.GeocodingQuery * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Maps.Search.Models.GeocodingResponse>>
Public Overridable Function GetGeocodingAsync (Optional query As String = Nothing, Optional options As GeocodingQuery = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of GeocodingResponse))

Parameters

query
String

A string that contains information about a location, such as an address or landmark name.

options
GeocodingQuery

additional options

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Applies to