-
- All Implemented Interfaces:
public interface SearchController
Controller to handle search POI
-
-
Method Summary
Modifier and Type Method Description abstract Unit
injectSearchEngine(SearchEngine searchEngine, CoroutineDispatcher dispatcher)
Inject a search engine to the controller. abstract Unit
injectPoiAnnotationFactory(PoiAnnotationFactory factory)
Inject a POI annotation factory to the controller. abstract Unit
displayPOI(List<String> displayContent)
SDK will observe the movement of camera and show POI if exist. abstract Unit
clear()
Clear all displayed POIs and their cached data. -
-
Method Detail
-
injectSearchEngine
abstract Unit injectSearchEngine(SearchEngine searchEngine, CoroutineDispatcher dispatcher)
Inject a search engine to the controller. If inject search engine multiple times, only the last one will work.
- Parameters:
searchEngine
- engine for the search taskdispatcher
- used for custom kotlinx.coroutines CoroutineDispatcher for poi search task, default dispatcher is Dispatchers.
-
injectPoiAnnotationFactory
abstract Unit injectPoiAnnotationFactory(PoiAnnotationFactory factory)
Inject a POI annotation factory to the controller. If this method is called, the map will refresh and use the new injected factory to create annotations. If this method is never called, the map will use the default method to create Annotation
-
displayPOI
abstract Unit displayPOI(List<String> displayContent)
SDK will observe the movement of camera and show POI if exist. The POIs are searched by the injected searchEngine with the searchTexts as search parameter. If the searchEngine is not injected. This method will not work.
- Parameters:
displayContent
- The search parameter.
-
-
-
-