getByTerm

fun getByTerm(search: String, languages: List<String?>? = null, country: String? = null, geometry: GeometryType? = null, isSuggestion: Boolean? = null): Sequence<Feature>

Search for features by a search term.

Return

A sequence of dictionary entries that match the search, or an empty sequence list if nothing is found.

Results are broadly sorted in this order: Matches with names, then with brand names, then with terms (keywords), then with tag values.

Parameters

search

The search term

geometry

Optional. If not null, only returns features that match the given geometry type.

languages

Optional. List of IETF language tags of languages in which the result should be localized.

Several languages can be specified to each fall back to if a translation does not exist in the language before that. For example, specify listOf("ca-ES","es", null) if results in Catalan are preferred, Spanish is also fine or otherwise use unlocalized results (null).

Defaults to listOf(<default system language>, null), i.e. unlocalized results are included by default. (Brand features are usually not localized.)

country

Optional. ISO 3166-1 alpha-2 country code (e.g. "US") or the ISO 3166-2 (e.g. "US-NY") of the country/state the element is in. If null, will only return matches that are not country-specific.

isSuggestion

Optional. true to only include suggestions, false to not include suggestions or null to include any in the result. Suggestions are brands, like 7-Eleven, Santander etc.