Retrieves the list of POI category types supported by the TomTom Search API.
The returned code values (POICategory) serve two purposes:
Pass to discoverPlaces({ filters: { poiCategories } }) to filter search results by category.
Pass as POIsModulefilters.categories to filter the map's built-in POI icons.
Generic parent codes (e.g. 'RESTAURANT') work there, but overly specific child codes
(e.g. 'ITALIAN_RESTAURANT') don't, so use a parent or a POICategoryGroup instead.
The list is cached per language, as POICategoriesParams describes, and filtered calls read it too.
// All categories const { poiCategories: all } = awaitgetPOICategories();
// Filtered by keyword, best match first const { poiCategories: gyms } = awaitgetPOICategories({ filters: ['gym'] }); gyms.forEach(category=>console.log(category.code, category.name, category.childCategoryCodes));
Retrieves the list of POI category types supported by the TomTom Search API.
The returned
codevalues (POICategory) serve two purposes:discoverPlaces({ filters: { poiCategories } })to filter search results by category.POIsModulefilters.categoriesto filter the map's built-in POI icons. Generic parent codes (e.g.'RESTAURANT') work there, but overly specific child codes (e.g.'ITALIAN_RESTAURANT') don't, so use a parent or aPOICategoryGroupinstead.The list is cached per language, as POICategoriesParams describes, and filtered calls read it too.