MapGptEVSearchContextProvider

class MapGptEVSearchContextProvider(evCore: EVCoreClient, observeIsElectricVehicle: ObserveIsElectricVehicle, unitOfMeasurementsUseCase: ObserveUserPreferredUnitOfMeasurementsUseCase) : UIComponent, EVGptSearchResultProvider

This class is used to provide nearby EV stations in the GPT context. It will monitor location updates and as the driver progresses a call will be made to the EV search service to get the closest stations and cache them for future use in the app.

WARNING: This is not a scalable solution. Making repeated calls to the EV search service to cache EV station data that may never be used wastes bandwidth, needlessly increases load on the server, and potentially has billing implications for Mapbox customers. Consult the EV team for a more permanent solution.

Constructors

Link copied to clipboard
constructor(evCore: EVCoreClient, observeIsElectricVehicle: ObserveIsElectricVehicle, unitOfMeasurementsUseCase: ObserveUserPreferredUnitOfMeasurementsUseCase)

Properties

Link copied to clipboard
lateinit var coroutineScope: CoroutineScope

Functions

Link copied to clipboard
fun getContext(): MapGptEVContextDTO
Link copied to clipboard
Link copied to clipboard
open override fun onAttached(mapboxNavigation: MapboxNavigation)
Link copied to clipboard
open override fun onDetached(mapboxNavigation: MapboxNavigation)