Area
public struct Area : Hashable
Area to perform search on.
-
Geographic coordinates of the center around which to provide the most relevant places. For Offline Search, one of
TextQuery.Area.areaCenter,TextQuery.Area.boxAreaandTextQuery.Area.circleAreahas to be set, otherwise it will result inSearchError.invalidArea.Declaration
Swift
public let areaCenter: GeoCoordinates? -
Geographic rectangle area in which to provide the most relevant places. For Offline Search, one of
TextQuery.Area.areaCenter,TextQuery.Area.boxAreaandTextQuery.Area.circleAreahas to be set, otherwise it will result inSearchError.invalidArea. Also, for Offline Search, search in a givenGeoBoxrestricts the results to only POIs.Declaration
Swift
public let boxArea: GeoBox? -
Geographic circle area in which to provide the most relevant places. For Offline Search, one of
TextQuery.Area.areaCenter,TextQuery.Area.boxAreaandTextQuery.Area.circleAreahas to be set, otherwise it will result inSearchError.invalidArea. Also, for Offline Search, search in a givenGeoCirclerestricts the results to only POIs.Declaration
Swift
public let circleArea: GeoCircle? -
Geographic corridor area in which to provide the most relevant places. The contained polyline and half-width define the area that will be used in a search query.
When used with SearchEngine, the polyline is compressed and sent. More complex polylines with large amounts of coordinates and with smaller half-width may have the less relevant part removed, such as the one far away from the search center. This usually makes no difference, because there will be enough POIs near the search center. For use cases where it is important to search the entire polyline, half-width can be increased or not set. For example: Route between New York and Chicago with half-width 800 will be added to request without removing the far away part, but route of the same length (around 360km) between Milan (Italy) and Konstanz (Germany) will have the far away part removed due to its complexity.
When
TextQuery.Area.corridorAreais provided,TextQuery.Area.areaCenterhas to be within it, otherwiseTextQuery.Area.areaCenteris ignored when searching.For Offline Search, search in a given
GeoCorridorrestricts the results to only POIs.Declaration
Swift
public let corridorArea: GeoCorridor? -
A list of countries that the query is applied in. Not supported in
OfflineSearchEngine(which is only available for the Navigate license).Declaration
Swift
public let countries: [CountryCode] -
Constructs a new instance of this class from provided parameters.
Declaration
Swift
public init(areaCenter: GeoCoordinates)Parameters
areaCenterGeographic coordinates of the center around which to provide the most relevant places.
-
Constructs a new instance of this class from provided parameters. For Offline Search, search in a given
GeoCirclerestricts the results to only POIs.Declaration
Swift
public init(inCircle circleArea: GeoCircle)Parameters
circleAreaGeographic circle area in which to provide the most relevant places.
-
Constructs a new instance of this class from provided parameters. The given corridor and center define the area that will be used in the search query.
When used with SearchEngine, the polyline is compressed and sent. More complex polylines with large amounts of coordinates and with smaller half-width may have the less relevant part removed, such as the one far away from the search center. This usually makes no difference, because there will be enough POIs near the search center. For use cases where it is important to search the entire polyline, half-width can be increased or not set. For example: Route between New York and Chicago with half-width 800 will be added to request without removing the far away part, but route of the same length (around 360km) between Milan (Italy) and Konstanz (Germany) will have the far away part removed due to its complexity.
The area center has to be within the corridor, otherwise it is ignored.
For Offline Search, search in a given
GeoCorridorrestricts the results to only POIs.Declaration
Swift
public init(inCorridor corridorArea: GeoCorridor, near areaCenter: GeoCoordinates)Parameters
corridorAreaGeographic corridor area in which to provide the most relevant places.
areaCenterGeographic coordinates of the prioritized area center.
-
Constructs a new instance of this class from provided parameters. The given list of countries and center define the area that will be used in the search query.
Declaration
Swift
public init(inCountries countries: [CountryCode], near areaCenter: GeoCoordinates)Parameters
countriesA list of countries that the query is applied in.
areaCenterGeographic coordinates of the prioritized area center.