import FetchPlaceParameters from "@arcgis/core/rest/support/FetchPlaceParameters.js";const FetchPlaceParameters = await $arcgis.import("@arcgis/core/rest/support/FetchPlaceParameters.js");- Inheritance
- FetchPlaceParameters→
PlacesParameters→ Accessor
- 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.
- 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 plumberrequestedFields: ["address", "description", "hours", "socialMedia"]});function fetchPlaceDetails() {places.fetchPlace(swedishFetchPlaceParameters).then(showPlaceDetails);}function showPlaceDetails(fetchResult) {console.log("Fetch place result: ", fetchResult);}fetchPlaceDetails();
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
| inherited | ||
| readonly inherited | ||
| inherited | ||
| | ||
| | ||
| inherited |
apiKey
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
icon
- 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.
url
- Type
- string
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"