POI categories service NodeJS

Find POI categories by keyword, best match first, and search places with their codes in NodeJS

CodeSandbox is a third-party service and may use cookies to see your IP address and browser info. Cookie notice

View on GitHub
Loading the sandbox…
SDK 1.0.0-rc.7

The console prints how many POI categories exist, the closest categories for a few keywords, a Spanish-language match, the places nearest Amsterdam for the codes keywords resolve to, and sushi or pizza places found from the words alone.

  • getPOICategories returns the catalogue with names and codes, cached per language, so category discovery does not mean hardcoding a list.
  • filters keeps each keyword’s closest matches, best first, so a short keyword does not pull in every category whose name merely contains it.
  • resolvePOICategories hands back the codes for one search, plus the keywords that matched nothing.
  • filters.poiCategoryQuery folds that lookup into the search, so discoverPlaces resolves the words itself.

Related examples