geocoder
constgeocoder:object
Defined in: src/geocoder.ts:17
Address ↔ coordinates search, mirroring ArcGIS.LocatorTask (Swift) /
com.arcgismaps.tasks.geocode.LocatorTask (Kotlin). Every call is asynchronous and runs
against the ArcGIS World Geocoding Service by default (override with params.locatorUrl).
The World service requires an API key — set it via <MapSettings> / setApiKey.
Type Declaration
Section titled “Type Declaration”geocode
Section titled “geocode”geocode: (
searchText,params?) =>Promise<GeocodeResult[]>
Geocodes an address or place name into a list of matches.
Parameters
Section titled “Parameters”searchText
Section titled “searchText”string
params?
Section titled “params?”Returns
Section titled “Returns”Promise<GeocodeResult[]>
geocodeSuggestion
Section titled “geocodeSuggestion”geocodeSuggestion: (
suggestionId,params?) =>Promise<GeocodeResult[]>
Geocodes a suggestion chosen from a prior suggest call, using the native SDK’s precise
geocode(forSuggestResult:) overload — avoids a text re-search and returns the exact match.
Parameters
Section titled “Parameters”suggestionId
Section titled “suggestionId”number
The suggestionId from a SuggestResult returned by suggest.
params?
Section titled “params?”Optional params; use locatorUrl only if it differs from the one used in
the suggest call (the registry already stores the original URL).
locatorUrl?
Section titled “locatorUrl?”string
Returns
Section titled “Returns”Promise<GeocodeResult[]>
reverseGeocode
Section titled “reverseGeocode”reverseGeocode: (
point,params?) =>Promise<GeocodeResult[]>
Reverse-geocodes a point into nearby addresses / places.
Parameters
Section titled “Parameters”params?
Section titled “params?”Returns
Section titled “Returns”Promise<GeocodeResult[]>
suggest
Section titled “suggest”suggest: (
searchText,params?) =>Promise<SuggestResult[]>
Returns autocomplete suggestions for a partial search; each result carries a suggestionId.
Parameters
Section titled “Parameters”searchText
Section titled “searchText”string
params?
Section titled “params?”Returns
Section titled “Returns”Promise<SuggestResult[]>