Example: Display odometer

Displays a vehicle's odometer readings over time

This tool is provided as an example and is available on an As-Is basis. You must assume all the risks and costs associated with the use of the sample tool, including, without limitation, any damage to any equipment, software, information or data. In addition, we are not obligated to provide any maintenance, technical or other support for the sample tool. In order to improve our products, we may at any time, and without warning, change the design, presentation, or functionality of the software.

Display odometer



This examples demonstrates retrieving trips and plotting the vehicle's odometer reading over time.

Work flow
Your vehicles are retrieved using an initial API request for all Device entities. Then when one is selected, the current odometer value is retrieved if available. Then, the vehicle's trips are used to count backward the distance travelled. Each trip distance is plotted on the chart.

Skill level