POIVisualization

Entry point for all methods related to the POI visualization.

Instances of POIVisualization are created using POIVisualizationFactory.create. You should call methods on these instances from the main thread only, otherwise an exception can occur.

To use a POIVisualization instance, first provide a list of POI with the POIVisualization.display method.

You can then call POIVisualization.display or clear to remove the POIs that have been added to the map by POIVisualization.

To support Android configuration changes, create a POIVisualization 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 addPOIClickListener(listener: POIClickListener)

Sets a listener for when a point of interest (POI) is clicked by the user. Only one listener can be active at a time. Any previously set listener will be replaced by the new one.

Link copied to clipboard
abstract fun clear()

Remove the previous added POIs from the map.

Link copied to clipboard
abstract fun display(poiList: List<POI>)

Display a list of POIs on the map. If any POI was already added before, it will not be added again.

Link copied to clipboard
abstract fun remove(poiList: List<POI>)

Remove POIs from the map if they were added before with POIVisualization.display.

Link copied to clipboard

Removes the POIClickListener.

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

Replaces the current TomTomMap with a new one.