W3WSearchEngine
public class W3WSearchEngine
extension W3WSearchEngine: NativeBase
extension W3WSearchEngine: Hashable
what3words is an alternative geocode system designed to identify any location on the planet.
The system divides the world into a grid of 57 trillion 3-by-3-metre squares, each of which
has a three-word address. For example, the front door of HERE’s Berlin office is identified by
“///wage.mere.heap”.
W3WSearchEngine allows you to convert 3 word addresses to coordinates and also coordinates
to 3 word addresses.
Note: Using W3WSearchEngine requires a licence to access HERE what3words APIs.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
-
Creates a new instance of this class.
Throws
InstantiationErrorIndicates what went wrong when the instantiation was attempted.Declaration
Swift
public init() throws -
Creates a new instance of this class.
Throws
InstantiationErrorIndicates what went wrong when the instantiation was attempted.Declaration
Swift
public init(_ sdkEngine: SDKNativeEngine) throwsParameters
sdkEngineInstance of an existing SDKEngine.
-
Performs an asynchronous request to search for a
W3WSquarethat corresponds to the given 3 words.Declaration
Swift
@discardableResult public func search(words: String, completion: @escaping W3WSearchCompletionHandler) -> TaskHandleParameters
wordsA 3 word address as a string. It must be three words separated with dots or a japanese middle dot character (・). Words separated by spaces will be rejected. Optionally, the 3 word address can be prefixed with ///.
completionCallback which receives the result on the main thread.
Return Value
Handle that can be used to manipulate the execution of the task.
-
Performs an asynchronous request to search for a
W3WSquare, which includes the 3 word address, that corresponds to the given coordinates.Declaration
Swift
@discardableResult public func search(coordinates: GeoCoordinates, language: String?, completion: @escaping W3WSearchCompletionHandler) -> TaskHandleParameters
coordinatesThe coordinates where to search.
languageA supported 3 word address language as an ISO 639-1 2 letter code. For Bosnian-Croatian-Montenegrin-Serbian use “oo”. Defaults to “en” (English).
completionCallback which receives the result on the main thread.
Return Value
Handle that can be used to manipulate the execution of the task.