Skip to content
import AddressToLocationsParameters from "@arcgis/core/rest/support/AddressToLocationsParameters.js";
Inheritance:
AddressToLocationsParametersAccessor
Since
ArcGIS Maps SDK for JavaScript 5.0

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.

address

Property
Type
any

The address argument is data object that contains properties representing the various address fields accepted by the corresponding geocode service. These fields are listed in the addressFields property of the associated geocode service resource. For example, if the addressFields of a geocode service resource includes fields with the following names: Street, City, State and Zone, then the address argument is of the form:

{
Street: "1234 W Main St",
City: "Small Town",
State: "WA",
Zone: "99027"
}

Locators published using ArcGIS 10 or later support a single line address field, which can be specified using the following syntax where field_name is the name of the single line address field. You can find this name by viewing the help or services directory for your locator services. Common values are SingleLine and SingleLineFieldName:

const address = {
"field_name": "380 New York St, Redlands, CA 92373"
};

The Services Directory can be used to find out the required and optional address fields and the correct names for the input name fields. If you are using the World Geocoding Service visit the ArcGIS Online Geocoding Service help for more details on the World Geocoder.

categories

Property
Type
string[] | null | undefined

Limit result to one or more categories. For example, "Populated Place" or "Scandinavian Food". Only applies to the World Geocode Service. See Category filtering (World Geocoding Service) for more information.

countryCode

Property
Type
string | null

Limit result to a specific country. For example, "US" for United States or "SE" for Sweden. Only applies to the World Geocode Service. See Geocode coverage (World Geocoding Service) for more information.

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor
Since
ArcGIS Maps SDK for JavaScript 4.7

The name of the class. The declared class name is formatted as esri.folder.className.

forStorage

Property
Type
boolean | null

Allows the results of single geocode transactions to be persisted.

location

autocast Property
Type
Point | null | undefined

Used to weight returned results for a specified area. Only used when the scale of the MapView.scale or SceneView.scale is less than or equal to 300,000.

locationType

Property
Type
LocationType | null | undefined

Define the type of location, either "street" or "rooftop", of the point returned from the World Geocoding Service.

magicKey

Property
Type
string | null | undefined

A suggestLocations result ID (magicKey). Used to query for a specific results information.

maxLocations

Property
Type
number | null | undefined

Maximum results to return from the query.

outFields

Property
Type
string[] | null | undefined

The list of fields included in the returned result set. This list is a comma delimited list of field names. If you specify the shape field in the list of return fields, it is ignored. For non-intersection addresses you can specify the candidate fields as defined in the geocode service. For intersection addresses you can specify the intersection candidate fields.

outSpatialReference

autocast Property
Type
SpatialReference | null | undefined

The spatial reference of the output geometries. If not specified, the output geometries are in the spatial reference of the input geometries when performing a reverse geocode and in the default spatial reference returned by the service if finding locations by address.

searchExtent

autocast Property
Type
Extent | null | undefined

Defines the extent within which the geocode server will search. Requires ArcGIS Server version 10.1 or greater.

Methods

MethodSignatureClass
fromJSON
inherited static
fromJSON(json: any): any
toJSON
inherited
toJSON(): any

fromJSON

inheritedstatic Method
Signature
fromJSON (json: any): any
Inherited from: JSONSupportMixin

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameters
ParameterTypeDescriptionRequired
json
any

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns
any

Returns a new instance of this class.

toJSON

inherited Method
Signature
toJSON (): any
Inherited from: JSONSupportMixin

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns
any

The ArcGIS portal JSON representation of an instance of this class.