MapGptLocationProvider

class MapGptLocationProvider(mapboxGeocodingUseCase: MapGptGeocodingUseCase = MapGptGeocodingUseCase()) : UIComponent

There is a bit of manual work here to get the region name from the geocoding response. This approach seems like it should be replaced. For example, these kinds of requests may be better handled by backend services. Another possibility is an integration with something like OpenAi plugins.

For now this provides a way to give MapGPT language input for the user's location.

Constructors

Link copied to clipboard
constructor(mapboxGeocodingUseCase: MapGptGeocodingUseCase = MapGptGeocodingUseCase())

Properties

Link copied to clipboard
lateinit var coroutineScope: CoroutineScope
Link copied to clipboard
val location: StateFlow<LocationMatcherResult?>
Link copied to clipboard
val region: StateFlow<MapGptLocationRegion?>

Functions

Link copied to clipboard
fun getLocation(): Location?
Link copied to clipboard
Link copied to clipboard
open override fun onAttached(mapboxNavigation: MapboxNavigation)
Link copied to clipboard
open override fun onDetached(mapboxNavigation: MapboxNavigation)