Interface SearchInterface

All Known Implementing Classes:
OfflineSearchEngine, SearchEngine

public interface SearchInterface

Provides the interface for the online and offline search engines.

  • Method Details

    • searchByText

      @NonNull TaskHandle searchByText(@NonNull TextQuery query, @NonNull SearchOptions options, @NonNull SearchCallback callback)

      Performs an asynchronous text query search for Place instances within a given TextQuery.Area. The returned places are sorted by relevance.

      Parameters:
      query -

      Desired free-form text query to search.

      options -

      Search options.

      callback -

      Callback which receives the result on the main thread.

      Returns:

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

    • searchByAddress

      @NonNull TaskHandle searchByAddress(@NonNull AddressQuery query, @NonNull SearchOptions options, @NonNull SearchCallback callback)

      Performs an asynchronous address query search for Place instances. This is the same type of search as forward geocoding, except that more data is returned than just the geographic coordinates of a given address. Note that an address can belong to more than one Place result, although all found places will share the same geographic coordinates. The returned places are sorted by relevance.

      Parameters:
      query -

      Desired free-form address query text to search.

      options -

      Search options.

      callback -

      Callback which receives the result on the main thread.

      Returns:

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

    • searchByCategory

      @NonNull TaskHandle searchByCategory(@NonNull CategoryQuery query, @NonNull SearchOptions options, @NonNull SearchCallback callback)

      Performs an asynchronous category search for Place instances. A list containing at least one PlaceCategory must be provided as part of the query.

      Parameters:
      query -

      Query with list of desired categories.

      options -

      Search options.

      callback -

      Callback which receives the result on the main thread.

      Returns:

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

    • searchByCoordinates

      @NonNull TaskHandle searchByCoordinates(@NonNull GeoCoordinates coordinates, @NonNull SearchOptions options, @NonNull SearchCallback callback)

      Performs an asynchronous search for Place instances based on the given geographic coordinates. This is the same search type as reverse geocoding, except that more data is returned than just the Address related to the given coordinates. Note that more than one Place can be related to the given coordinates. The returned places are sorted by relevance.

      Parameters:
      coordinates -

      The coordinates where to search.

      options -

      Search options.

      callback -

      Callback which receives result on the main thread.

      Returns:

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

    • searchByPlaceId

      @NonNull TaskHandle searchByPlaceId(@NonNull PlaceIdQuery query, @Nullable LanguageCode languageCode, @NonNull PlaceIdSearchCallback callback)

      Performs an asynchronous search for a Place based on its ID and LanguageCode.

      Parameters:
      query -

      The id of place to search.

      languageCode -

      The preferred language for the search results. When unset or unsupported language is chosen, results will be returned in their local language.

      callback -

      Callback which receives the result on the main thread.

      Returns:

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

    • searchByPickedPlace

      @NonNull TaskHandle searchByPickedPlace(@NonNull PickedPlace pickedPlace, @Nullable LanguageCode languageCode, @NonNull PlaceIdSearchCallback callback)

      Performs an asynchronous search for a Place based on the content found in PickedPlace. If PickedPlace data is obtained from the offline map, it may happen that the newer version that is used by the online service represented by SearchEngine no longer contains the related POI. In that case, SearchError.NO_RESULTS_FOUND error is reported. When that happens, you may try to obtain the POI from the offline map by calling OfflineSearchEngine.searchByPickedPlace, only available for the Navigate license.

      Parameters:
      pickedPlace -

      The content picked from map.

      languageCode -

      The preferred language for the search result. When unset or unsupported language is chosen, result will be returned in the local language.

      callback -

      Callback which receives the result on the main thread.

      Returns:

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

    • suggestByText

      @NonNull TaskHandle suggestByText(@NonNull TextQuery query, @NonNull SearchOptions options, @NonNull SuggestCallback callback)

      Performs an asynchronous request to suggest places for text queries and returns suggestions sorted by relevance.

      Note that while OfflineSearchEngine includes as many details as are available, SearchEngine includes only the information that is relevant for autosuggest use cases. Complete details can be obtained by searching with PlaceIdQuery.

      Parameters:
      query -

      Desired text query to search.

      options -

      Search options.

      callback -

      Callback which receives the result on the main thread.

      Returns:

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