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)