Skip to content
import FetchPlaceParameters from "@arcgis/core/rest/support/FetchPlaceParameters.js";
Inheritance:
FetchPlaceParametersPlacesParametersAccessor
Since
ArcGIS Maps SDK for JavaScript 4.27

The following properties define the parameters for the fetchPlace() method pointing to a url that represents a places service. The places service is a ready-to-use service that can search for businesses and geographic locations around the world. It allows you to discover, locate, and return detailed information about a place.

See also
Example
const [places, FetchPlaceParameters] = await $arcgis.import([
"@arcgis/core/rest/places.js",
"@arcgis/core/rest/support/FetchPlaceParameters.js"
]);
const swedishFetchPlaceParameters = new FetchPlaceParameters({
apiKey: "YOUR_API_KEY",
placeId: "571624acd79b8a99897357a25b744a20", // really good plumber
requestedFields: ["address", "description", "hours", "socialMedia"]
});
function fetchPlaceDetails() {
places.fetchPlace(swedishFetchPlaceParameters).then(showPlaceDetails);
}
function showPlaceDetails(fetchResult) {
console.log("Fetch place result: ", fetchResult);
}
fetchPlaceDetails();

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.
PropertyTypeClass
apiKey
inherited
declaredClass
readonly inherited
icon
inherited
"cim" | "png" | "svg" | null | undefined
url
inherited

apiKey

inherited Property
Type
string | null | undefined
Inherited from: PlacesParameters

An authorization string used to access a resource or service. API keys are generated and managed in the portal. An API key is tied explicitly to an ArcGIS account; it is also used to monitor service usage. Setting a fine-grained API key on a specific class overrides the global API key.

See also

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

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

icon

inherited Property
Type
"cim" | "png" | "svg" | null | undefined
Inherited from: PlacesParameters
Since
ArcGIS Maps SDK for JavaScript 4.30

Determines whether icons are returned and the type of icons returned. The PNG icons are provided as 48 x 48 pixels but for map display the recommended size is 16 x 16 pixels. Icons are not returned if the value is null.

placeId

Property
Type
string | null | undefined

The Id of the place that you want to fetch additional details. This is required.

requestedFields

Property
Type
string[] | null | undefined

The array of fields that define the attributes to return for a place. Use this property to define the attributes you would like returned. This is required.

See also

url

inherited Property
Type
string
Inherited from: PlacesParameters

URL to the places service. The places service is a ready-to-use service that can search for businesses and geographic locations around the world. It allows you to discover, locate, and return detailed information about a place.

Default value
"https://places-api.arcgis.com/arcgis/rest/services/places-service/v1"