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?

The API key allows your app to access ArcGIS location services and private portal items. An API key is a unique long-lived access token that is used to authenticate and monitor requests to ArcGIS location services and private portal items. You can create and manage an API key using your portal when you sign in with an ArcGIS Location Platform account or an ArcGIS Online account with administrator access or a custom role that has the Generate API keys privilege. To learn how to create and manage API keys, go to the Create an API Key tutorial. You must ensure that your API key has the correct privileges to access secure resources.

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.