Class W3WSearchEngine

java.lang.Object
com.here.NativeBase
com.here.sdk.search.W3WSearchEngine

public final class W3WSearchEngine extends NativeBase

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.

  • Constructor Details

  • Method Details

    • search

      @NonNull public TaskHandle search(@NonNull String words, @NonNull W3WSearchCallback callback)

      Performs an asynchronous request to search for a W3WSquare that corresponds to the given 3 words.

      Parameters:
      words -

      A 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 ///.

      callback -

      Callback which receives the result on the main thread.

      Returns:

      Handle that can be used to manipulate the execution of the task.

    • search

      @NonNull public TaskHandle search(@NonNull GeoCoordinates coordinates, @Nullable String language, @NonNull W3WSearchCallback callback)

      Performs an asynchronous request to search for a W3WSquare, which includes the 3 word address, that corresponds to the given coordinates.

      Parameters:
      coordinates -

      The coordinates where to search.

      language -

      A supported 3 word address language as an ISO 639-1 2 letter code. For Bosnian-Croatian-Montenegrin-Serbian use "oo". Defaults to "en" (English).

      callback -

      Callback which receives the result on the main thread.

      Returns:

      Handle that can be used to manipulate the execution of the task.