Points of interest

VERSION 0.2.1455
PUBLIC PREVIEW

POI categories

The POI categories search is used to obtain a list of all POI categories and subcategories, together with synonyms. You can request categories in different languages. See the list of supported languages. More detailed information about this service can be found in the Search API POI Categories documentation.

To perform a call, you need to create a POICategoriesQuery using POICategoriesQueryBuilder where you can specify the desired response language.

If no language is specified, categories will be returned in English.

let query = POICategoriesQueryBuilder().withLanguage("en-GB").build()

As you created the query, you can:

1let searchService = TomTomOnlineSearchService()
2searchService.poiCategories(query: query) { poiCategoriesResponse, error in
3 if let poiCategoriesResponse = poiCategoriesResponse {
4 // handle success
5 } else if let error = error {
6 // handle error
7 }
8}

As a result you will get: POICategoriesResponse that contains the array poiCategories of POICategory.