GPX Route
- UIKit
This example demonstrates how to use GEMKit in a UIKit application to load a .gpx file bundled with the app, calculate a route that follows the track, display it on the map, and simulate riding it.
Check the full implementation on GitHub.

GPX Route Overview

Routing

Sharing GPX file
UI and Map Integration
The view controller sets up a map and navigation context and implements the NavigationContextDelegate to receive simulation lifecycle callbacks:
Loading GPX Data and Calculating the Route
The bundled .gpx file is loaded as Data and passed to calculateRoute(withStartWaypoints:buffer:endWaypoints:completionHandler:). Optional start and end waypoint arrays allow pinning the route to explicit landmarks:
Simulating Navigation Along the GPX Track
Once a route is calculated, the simulation begins at 2× speed and the map starts following the simulated position: