/** * A convenience module for importing [locator](https://developers.arcgis.com/javascript/latest/references/core/rest/locator/) functions when developing with * [TypeScript](https://developers.arcgis.com/javascript/latest/get-started/#typescript). * For example, rather than importing functions one at a time like this: * * ```js * import { addressToLocations } from "@arcgis/core/rest/locator/addressToLocations.js"; * import { locationToAddress } from "@arcgis/core/rest/locator/locationToAddress.js"; * ``` * * You can use this module to import them on a single line: * * ```js * import { addressToLocations, locationToAddress } from "@arcgis/core/rest/locator.js"; * ``` * * Represents a geocode service resource exposed by the ArcGIS Server REST API. It is used to * generate candidates for an address. It is also used to generate batch results for a set of addresses. * * Set the URL to the ArcGIS Server REST resource that represents a Locator service, for example: `https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer`. * * @since 4.19 * @see [World Geocoding Service](https://developers.arcgis.com/rest/geocode/api-reference/overview-world-geocoding-service.htm) */ import type AddressCandidate from "./support/AddressCandidate.js"; import type SuggestionCandidate from "./support/SuggestionCandidate.js"; import type { RequestOptions } from "../request/types.js"; import type { AddressesToLocationsParametersProperties } from "./support/AddressesToLocationsParameters.js"; import type { AddressToLocationsParametersProperties } from "./support/AddressToLocationsParameters.js"; import type { LocationToAddressParametersProperties } from "./support/LocationToAddressParameters.js"; import type { SuggestLocationsParametersProperties } from "./support/SuggestLocationsParameters.js"; /** * Sends a request to the ArcGIS REST geocode resource to find candidates for a single address specified in the address parameter. * * @param url - URL to the ArcGIS Server REST resource that represents a locator service. * @param params - Specify at least the `address` and optionally other properties. * See the object specifications table below. * @param requestOptions - Additional [options](https://developers.arcgis.com/javascript/latest/references/core/request/#request) to be used for the data request. * @returns When resolved, returns an array of [AddressCandidates](https://developers.arcgis.com/javascript/latest/references/core/rest/support/AddressCandidate/). * Each element of the array is a candidate that matches the input address. */ export function addressToLocations(url: string, params: AddressToLocationsParametersProperties, requestOptions?: RequestOptions): Promise; /** * Find address candidates for multiple input addresses. This method requires an ArcGIS Server 10.1 or greater geocode service. * * @param url - URL to the ArcGIS Server REST resource that represents a locator service. * @param params - See specifications below. * @param requestOptions - Additional [options](https://developers.arcgis.com/javascript/latest/references/core/request/#request) to be used for the data request. * @returns When resolved, the result is an array of [AddressCandidates](https://developers.arcgis.com/javascript/latest/references/core/rest/support/AddressCandidate/). * Each element of the array is a candidate that matches the input address. */ export function addressesToLocations(url: string, params: AddressesToLocationsParametersProperties, requestOptions?: RequestOptions): Promise; /** * Locates an address based on a given point. * * @param url - URL to the ArcGIS Server REST resource that represents a locator service. * @param params - Specify at least the `location` and optionally the `locationType`. * @param requestOptions - Additional [options](https://developers.arcgis.com/javascript/latest/references/core/request/#request) to be used for the data request. * @returns When resolved successfully, the result is an [AddressCandidate](https://developers.arcgis.com/javascript/latest/references/core/rest/support/AddressCandidate/). */ export function locationToAddress(url: string, params: LocationToAddressParametersProperties, requestOptions?: RequestOptions): Promise; /** * Get character by character auto complete suggestions. * * @param url - URL to the ArcGIS Server REST resource that represents a locator service. * @param params - An object that defines suggest parameters. See specifications below. * @param requestOptions - Additional [options](https://developers.arcgis.com/javascript/latest/references/core/request/#request) to be used for the data request. * @returns Resolves to an array of [SuggestionCandidate](https://developers.arcgis.com/javascript/latest/references/core/rest/support/SuggestionCandidate/) * objects. */ export function suggestLocations(url: string, params: SuggestLocationsParametersProperties, requestOptions?: RequestOptions): Promise;