getCategories(requestOptions:Â IGetCategoriesOptions): Promise<IGetCategoriesResponse>
The ArcGIS Places service has many categories (or types) of place, from art museums to zoos. This endpoint returns all the categories including their label and categoryId
. The category Id can be used to search for types of places with a places/near-point
or places/within-extent
request.
Categories also have information on their parent
. This allows you to search for specific categories such as "French Restaurant" - or to look for more generic types such as "Restaurant".
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
import { getCategories } from "@esri/arcgis-rest-places";
import { ApiKeyManager } from "@esri/arcgis-rest-request";
const response = await getCategories({
authentication: ApiKeyManager.fromKey("YOUR_API_KEY")
});
console.log(response.categories);
Returns Promise<IGetCategoriesResponse>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4