LocatorTask

A class can be used to convert an address to a point (geocode) or vice-versa (reverse geocode). LocatorTask involves finding matching locations for a given address. Reverse-geocoding is the opposite and involves finding corresponding addresses for a given location.

Since

200.1.0

Constructors

Link copied to clipboard
constructor(uri: String)

Creates a new locator task object.

Properties

Link copied to clipboard

Locator info. Information about locator.

Link copied to clipboard
val uri: String?

The URI of online service or local locator.

Inherited properties

Link copied to clipboard
open override var apiKey: ApiKey?

An API key is a unique key used to authorize access to specific services and resources in ArcGIS Online. It is also used to monitor access to those services.

Link copied to clipboard
open override val loadStatus: StateFlow<LoadStatus>

The load status.

Functions

Link copied to clipboard
suspend fun geocode(suggestResult: SuggestResult?, parameters: GeocodeParameters? = null): Result<List<GeocodeResult>>

Geocodes suggest with parameters and returns candidates. Executes geocoding based on result of suggestion.

suspend fun geocode(searchText: String, parameters: GeocodeParameters? = null): Result<List<GeocodeResult>>

Geocodes address with parameters and returns candidates. Executes a geocoding operation to find location candidates for a given address.

suspend fun geocode(searchValues: Map<String, String>, parameters: GeocodeParameters? = null): Result<List<GeocodeResult>>

Geocodes multiline address with parameters and returns candidates. Executes a geocoding operation to find location candidates for a given multiline address.

Link copied to clipboard
suspend fun reverseGeocode(location: Point, parameters: ReverseGeocodeParameters? = null): Result<List<GeocodeResult>>

Finds address with parameters by location point. Executes a reverse-geocoding operation to find address candidates for a given location.

Link copied to clipboard
suspend fun suggest(searchText: String, parameters: SuggestParameters? = null): Result<List<SuggestResult>>

Suggest address with parameters and returns possible variants. Geocoding suggestions provide a mechanism for implementing character-by-character auto-complete. Using a text input and optional SuggestParameters, suggested addresses can be quickly found and presented to the user. Suggestions are not limited to addresses, they can also be used for POIs (Points of Interest). To return a focused set of suggestions, set the SuggestParameters.getPreferredSearchLocation() or the SuggestParameters.getSearchArea(). Using the SuggestParameters.getPreferredSearchLocation() is similar to how ArcGIS Pro limits the suggestions returned.

Inherited functions

Link copied to clipboard
open override fun cancelLoad()

Cancels loading metadata for the Loadable object.

Link copied to clipboard
open suspend override fun load(): Result<Unit>

Loads the metadata for the object.

Link copied to clipboard
open suspend override fun retryLoad(): Result<Unit>

Loads or retries loading metadata for the object.