Quickstart

Install the SDK, get an API key, ask for a route, start turn-by-turn guidance and show the 3D map. It takes about five minutes. The samples are copied from the quickstarts in the SDK docs, which our test suite compiles and runs.

Platform

1Install the SDK

Requires iOS 15 (or macOS 12) and Xcode 16 or later. Unzip the release archive, MeridianAtlas-0.1.0-rc.6.zip. In Xcode, choose File › Add Package Dependencies… › Add Local…, pick the MeridianAtlas folder, then import it:

import MeridianAtlas

2Get an API key

Create a free account (the Build plan needs no card), then create a key in Atlas Studio with these three features switched on:

Routescore_routingTo get the route
NavigationnavigationTo guide the driver
Mapsmap_tilesTo show the 3D map

For a key that ships in your app, choose an app key and add your iOS bundle ID, your Android package name and the SHA-256 of each certificate that signs the Android app (./gradlew signingReport prints them; debug and release builds are signed differently, so list both). Restricted app keys need SDK 0.1.0-rc.2 or later, which sends your app's bundle ID or package name and signing certificate automatically. The secret is shown once: keep it out of source control, for example in a build-time configuration file you don't commit.

Once the key is made, Studio shows the next two steps filled in with its name, and a Try it button that makes a real route request with it, so you can see a route before writing any code.

Forgot a feature? Calls for it fail with capability_required, and the error names the feature to switch on. A key's features are chosen when it's made: make a new key with the feature, then revoke the old one.

3Get a route

let atlas = try AtlasConfiguration(apiKey: apiKey)
let routes = AtlasRoutes(configuration: atlas)
let route = try await routes.route(from: [-2.2511, 53.4747], to: [-2.246, 53.4837])
// route.guidance: the steps to show and speak
// route.plan: an AtlasRoutePlan, what navigation.begin() takes
// route.speedSections: the speed limits along it

Make one configuration and give it to every client, the navigation session and the map. It names your app on every request (bundle ID; package name and signing certificate), so an app key works. The key is all it needs: the service defaults to https://api.meridianatlas.dev and the map viewer to https://maps.meridianatlas.dev/v1.

That domain isn't live yet. Until it is, beta partners pass the two addresses Meridian gave them: baseURL and viewerURL on iOS, baseUrl and viewerUrl on the others (each platform's quickstart shows how).

Pass departureTime: (a Date) to plan a later journey and trafficAware: true to allow for traffic.

4Start guidance

Begin a navigation session with the route's plan. Each update has a snapshot (the phase, progressM and remainingM) and effects. Made with the configuration, the session reroutes by itself: when the car leaves the route it fetches a new one, from where the car is and facing the way it is going, keeps the old route until it arrives, and hands you the new route to show (route_replaced). It also registers its navigation leg when guidance begins, so the reroutes inside it cost nothing more.

let navigation = AtlasNavigation(configuration: atlas, onUpdate: { update in
    banner.show(update.snapshot)
    for effect in update.effects where effect.type == "route_replaced" {
        // The session rerouted: show the new route, and guide by its steps.
        if let route = effect.route { map.show(route) }
    }
})
let state = try navigation.begin(route.plan)

// Feed it every Core Location fix, and tick about once a second:
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
    locations.forEach { navigation.ingest($0) }
}
Timer.scheduledTimer(withTimeInterval: 1, repeats: true) { _ in navigation.tick() }

Permissions. Add NSLocationWhenInUseUsageDescription to Info.plist, and the location background mode for guidance with the screen locked. You can also begin with your own coordinates: AtlasRoutePlan(id: "route-1", mapVersion: "2026-11", coordinates: routeCoordinates).

5Show the map

AtlasMapView is the Atlas 3D map, from the Atlas map viewer at the configuration's viewer address; the viewer gets your key for its scenery, never in its URL. Show it the route whose plan you began (the AtlasRoute, so the route line moves into the lane each junction needs), then pass it each snapshot to move the car, estimated progress through tunnels included.

let map = try AtlasMapView(configuration: atlas,
                           presentation: try AtlasMapPresentation(style: .standard, navigationUI: true))
map.onError = { code, message in showStatus("Map: \(message)") }
view.addSubview(map)
map.show(route)  // the AtlasRoute whose plan you began
// and in AtlasNavigation's onUpdate:
map.update(update.snapshot)

navigationUI shows Meridian's built-in guidance panels; leave it off to draw your own. After a reroute, show the new route: it is swapped in place without reloading the map. For the game-map Neon Coast look, choose the neon-coast style. See the map view guide.

6Handle errors

Every service call throws AtlasError. Its code is the same on every Atlas SDK, its message says what to fix (ending with a link to that code's entry), isRetryable says whether trying again later can work, and requestId is for support.

do {
    route = try await routes.route(from: origin, to: destination)
} catch let error as AtlasError {
    if error.code == "capability_required" { status = "Turn on \(error.capability ?? "this feature") for this key" }
    else if error.isRetryable { status = "No connection: try again" }  // network_error, request_timeout, rate_limit…
    else { status = error.message }                                    // says what to fix, with a link
}

Every code, what it usually means and what to do, is in Errors: a missing or refused key, a wrong service address, no connection, a rate limit, a place outside the UK, location permission and the map viewer.

Next steps

The full quickstart for each platform, with Places, traffic, route matrices, multi-stop routes and errors: iOS, Android, React Native, Flutter and servers.

Proposal · draft