Skip to content

AdamRatcliffe-TomTom/android-gpx

Repository files navigation

GPX example for Android

⚠️ Uses SDK version 0.3.1056. Changes may be required for later SDK versions.

This example demonstrates how to reconstruct a route from a GPX track. The Routing API from the Maps SDK uses the supportingPoints parameter to reconstruct a route from a sequence of points when planning a route. In the example a GPX file is read from the app assets directory, and the track points from the file passed as supporting points when the route is calcuated. The route path returned by the Routing API is drawn on the map. For more information on using supporting points see Custom routes in the SDK documentation.

To simplify parsing the GPX file the example uses the Android GPX Parser library.

Running the example

  1. To run the example you'll need an API key with the Map Display and Routing with Extended Guidance APIs enabled.

  2. Open the project in Android Studio, the file local.properties will be generated in your project level directory, and add the following code to local.properties, replacing YOUR_API_KEY with your API key.

API_KEY=YOUR_API_KEY

  1. Save the file and run the app.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages