SearchVisualization

Entry point for all methods related to the search visualization.

Instances of SearchVisualization are created using SearchVisualizationFactory.create. You should call methods on these instances from the main thread only, otherwise an exception can occur. SearchVisualization is used to display results obtained from using Search API on the map. You can then call clear to remove all the primitives that have been added to the map.

To support Android configuration changes, create a SearchVisualization instance on the ViewModel and use replaceMap once the Activity/Fragment is recreated.

Important: This is a Public Preview API. It may be changed or removed at any time.

Functions

Link copied to clipboard
abstract fun clear()

Clears all elements on the map that were displayed with SearchVisualization.

Link copied to clipboard
abstract fun displaySearchResults(searchResults: List<SearchResult>)

Displays the search results returned from the Search API.

Link copied to clipboard
abstract fun removeSearchResult(searchResults: List<SearchResult>)

Removes the search results from the map.

Link copied to clipboard
abstract fun replaceMap(tomtomMap: TomTomMap)

Replaces the current TomTomMap with a new one.