buildPoiCategorySearchOptions

fun buildPoiCategorySearchOptions(@Size(min = 1, max = 10) categoryIds: Set<CategoryId>, geoBias: GeoPoint? = null, language: Locale = Locale.ENGLISH, @IntRange(from = 1, to = 100) limit: Int = 15): SearchOptions

Creates SearchOptions for searching Points of Interest (POIs) by their categories.

Return

An instance SearchOptions that can be used to perform a poi search by category request.

Parameters

categoryIds

Restricts the Points Of Interest in the response to those whose ID is listed. The list of categories can be discovered using the Search.requestPoiCategories API. When multiple category identifiers are provided, only POIs that belong to (at least) one of the categories from the provided list will be returned. The response includes POIs belonging to the specified POI category as well as any children POI category. For example, a search for com.tomtom.sdk.location.poi.StandardCategoryId.Restaurant will include results from com.tomtom.sdk.location.poi.StandardCategoryId.IndianRestaurant. If an empty set is provided, an IllegalArgumentException will be thrown. If more than 10 CategoryIds are provided, an IllegalArgumentException will be thrown.

geoBias

The position to bias the results towards. If not specified, no bias is applied.

language

The preferred language used for providing results. Defaults to Locale.ENGLISH.

limit

The maximum number of results to return. Must be in the range 1, 100. If outside this range, an IllegalArgumentException will be thrown.

Throws

if any of the provided arguments do not meet their specified constraints.