EV Range Map
EV Range Map is a component of the Navigation SDK UX Framework which calculates and visualizes range on a map based on EV's battery characteristics and energy consumption model. The feature is only available in free drive mode and when ELECTRIC engine type is specified.
Installation
dependencies {
...
implementation "com.mapbox.navigationux:ev-rangemap:1.0.0-rc.3.1"
...
}
dependencies {
...
implementation("com.mapbox.navigationux:ev-rangemap:1.0.0-rc.3.1")
...
}
Add the library dependency to your build.gradle.kts
or build.gradle
file. The library version always matches UX Framework version as they have the same release cadence.
Show/Hide EV Range Map
Use DashCoordination#showEvRangeMap
to trigger the calculation of an EV Range Map.
Once the EV Range Map is created, it will be visible on the map:
Dash.controller.showEvRangeMap()
To hide the EV Range map use DashCoordination#hideEvRangeMap
:
Dash.controller.hideEvRangeMap()
The UX Framework also provides a pre-configured sidebar button that allows users to show and hide an EV Range Map.
To display the button, users have to enable Show Range Map button
option in Vehicle Type settings screen.
Learn how to configure appearance of the EV Range Map.