SearchQuery
public struct SearchQuery
Specifies fuzzy search conditions
Important
This is a Public Preview API. It may be changed or removed at any time.-
init(_:geoBias: limit: offset: searchAreas: locale: categories: openingHours: fuzzyLevel: countries: brands: minPower: maxPower: fuelTypes: resultTypeSet: connectors: geoPoliticalView: ) Declaration
Swift
public init( _ query: String = "", geoBias: CLLocationCoordinate2D? = nil, limit: Int? = nil, offset: Int? = nil, searchAreas: Geometry? = nil, locale: Locale = Locale.current, categories: Set<PoiCategoryId> = [], openingHours: OpeningHoursMode? = nil, fuzzyLevel: Int = 2, countries: Set<String> = [], brands: Set<Brand> = [], minPower: Measurement<UnitPower>? = nil, maxPower: Measurement<UnitPower>? = nil, fuelTypes: Set<FuelType> = [], resultTypeSet: [SearchResultType] = [], connectors: Set<ConnectorType> = [], geoPoliticalView: GeoPoliticalView? = nil )Parameters
queryThe search query.
geoBiasThe position where results should be biased.
limitThe maximum number of search results that will be returned.
offsetThe starting offset of the returned results within the full result set.
searchAreasThe geographic filter for search, all search results returned are confined in the specified geography.
localeThe language in which search results should be returned. If not specified, language is set to the default official language of the location of the result.
categoriesRestricts the Points Of Interest in the response to those whose category ID is listed.
openingHoursScope of the opening hours to be provided.
fuzzyLevelFuzziness level. Ranges from 1 to 4 and defaults to 2.
countriesA set of ISO 3166-1 alpha3 country codes. (e.g., FRA, ESP, USA). This will limit the search to the specified countries.
brandsA set of brands used to restrict the result to POIs associated with those brands.
minPowerThe minimal power that a charging station can provide.
maxPowerThe maximal power that a charging station can provide.
fuelTypesA set of fuel types that a gas station can provide.
resultTypeSetA set of
SearchResultTypeto filter results.
-
The search query.
Declaration
Swift
public var query: String -
The position where results should be biased.
Declaration
Swift
public var geoBias: CLLocationCoordinate2D? -
The maximum number of search results that will be returned.
Declaration
Swift
public var limit: Int? -
The starting offset of the returned results within the full result set.
Declaration
Swift
public var offset: Int? -
The geographic filter for search, all search results returned are confined in the specified geography. СircleGeometry and RectangleGeomety support geoBias. СircleGeometry center is also used as geoBias. PolygonGeometry ignores geoBias.
Declaration
Swift
public var searchAreas: Geometry? -
The language in which search results should be returned. If not specified, language is set to the default official language of the location of the result.
Declaration
Swift
public var locale: Locale? -
Restricts the Points Of Interest in the response to those whose category ID is listed.
Declaration
Swift
public var categories: Set<PoiCategoryId> -
Scope of the opening hours to be provided.
Declaration
Swift
public var openingHours: OpeningHoursMode? -
Fuzziness level. Ranges from 1 to 4 and defaults to 2.
Declaration
Swift
public var fuzzyLevel: Int -
A set of ISO 3166-1 alpha3 country codes. (e.g., FRA, ESP, USA). This will limit the search to the specified countries.
Declaration
Swift
public var countries: Set<String> -
A set of brands used to restrict the result to POIs associated with those brands.
Declaration
Swift
public var brands: Set<Brand> -
The minimal power that a charging station can provide.
Declaration
Swift
public var minPower: Measurement<UnitPower>? -
The maximal power that a charging station can provide.
Declaration
Swift
public var maxPower: Measurement<UnitPower>? -
A set of fuel types that a gas station can provide.
Declaration
Swift
public var fuelTypes: Set<FuelType> -
A list of
SearchResultTypeto filter results.Declaration
Swift
public var resultTypeSet: [SearchResultType] -
A list of connector types that a charging station supports. See https://developer.tomtom.com/search-api/search-api-documentation/supported-connector-types for more details.
Declaration
Swift
public var connectors: Set<ConnectorType> -
Defines what kind of geopolitical view should be used.
Declaration
Swift
public var geoPoliticalView: GeoPoliticalView?
SearchQuery Structure Reference