Native
Giro
A native route recorder with local history and a smaller representation for drawing long routes.
Try the mechanism
Compare a recorded route with the smaller copy used to draw it.
The example uses synthetic inputs to isolate this behavior. It does not operate the underlying app.
The recorder preserves coordinates while RouteSimplifier returns a display copy. It thins points by distance and then applies a point budget, keeping the endpoints.
Inside the implementation
static func displayCoordinates(
from coordinates: [GeoCoordinate],
minimumDistance: CLLocationDistance = 4,
maximumPoints: Int = 1_200
) -> [CLLocationCoordinate2D]
// In the intermediate-point loop:
if location.distance(from: lastLocation) >= minimumDistance {
thinned.append(coordinate)
lastLocation = location
}Implementation decisions
- Preserve the archived recording.
- Bound the number of points sent to the renderer.
- Keep navigation handoff separate from recording.
Built with
Swift · SwiftUI · Core Location