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

The PlacesQueryResult object includes the results from the queryPlacesNearPoint() and queryPlacesWithinExtent() methods. Along with the results themselves, the previous or next set of query parameters are also included. The results are an array of PlaceResult objects.

See also
Example
const [places, PlacesQueryParameters] = await $arcgis.import([
"@arcgis/core/rest/places.js",
"@arcgis/core/rest/support/PlacesQueryParameters.js"
]);
const point = {
type: "point", // autocasts as new Point()
longitude: 17.81840,
latitude: 59.42145
};
const swedishPlacesQueryParameters = new PlacesQueryParameters({
apiKey: "YOUR_API_KEY",
categoryIds: ["63be6904847c3692a84b9b4c"], // Bathroom Contractor
radius: 10000, // set radius to 10,000 meters
point
});
function findPlaces() {
places.queryPlacesNearPoint(swedishPlacesQueryParameters).then(showPlaces);
}
function showPlaces(placesSolveResult) {
// results from the queryPlacesNearPoint() method
console.log("PlacesQueryResult: ", placesSolveResult);
}
findPlaces();

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.

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

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

nextQueryParams

Property
Type
PlacesQueryParameters | null | undefined

The query parameters for the next set of results.

previousQueryParams

Property
Type
PlacesQueryParameters | null | undefined

The query parameters for the previous set of results.

results

autocast Property
Type
PlaceResult[]

An array of results from searching for places using the queryPlacesNearPoint() and queryPlacesWithinExtent() methods.

See also