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.
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:
Requires Android 8.0 (API 26) or later. There are two artifacts: atlas-core (pure-Kotlin sessions, no Android dependencies) and atlas-android (the map view, GPS service and offline jobs, which brings in the core). Until they are on a registry, add the release's android/maven folder as a repository:
Requires iOS 15.1 and Android 8.0 (API 26) or later. New React Native apps start at API 24, so set minSdkVersion = 26 in android/build.gradle. The package includes its native module, which is autolinked.
Requires iOS 15 and Android 8.0 (API 26) or later. Unpack the release archive, meridian_atlas-0.1.0-rc.6.tar.gz, next to your app and depend on it by path. Set minSdk = 26 in android/app/build.gradle.kts and platform :ios, '15.0' in ios/Podfile.
import MeridianAtlas
// settings.gradle.kts dependencyResolutionManagement { repositories { google(); mavenCentral(); maven { url = uri("path/to/release/android/maven") } } } // app/build.gradle.kts dependencies { implementation("dev.meridianatlas:atlas-android:0.1.0-rc.6") }
npm install ./meridianatlas-react-native-0.1.0-rc.6.tgz cd ios && pod install
# pubspec.yaml
dependencies:
meridian_atlas:
path: ../meridian_atlas
Create the native bridges once, when your app starts:
import { NativeModules, NativeEventEmitter } from "react-native"; import { createAtlasNativeBridges } from "@meridianatlas/react-native"; const bridges = createAtlasNativeBridges(NativeModules.MeridianAtlas, NativeEventEmitter); // bridges.navigation, bridges.freeDrive, bridges.offline
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:
core_routingTo get the routenavigationTo guide the drivermap_tilesTo show the 3D mapFor 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.
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
val atlas = AtlasConfiguration(context, apiKey) val routes = AtlasRoutes(atlas) val route = withContext(Dispatchers.IO) { // the call blocks: keep it off the main thread routes.route(AtlasCoordinate(-2.2511, 53.4747), AtlasCoordinate(-2.246, 53.4837)) } // route.guidance, route.plan (an AtlasRoutePlan), route.speedSections
import { NativeModules } from "react-native"; import { AtlasRoutes, atlasAppIdentity, atlasConfiguration } from "@meridianatlas/react-native"; const atlas = atlasConfiguration({ apiKey, appIdentity: atlasAppIdentity(NativeModules.MeridianAtlas) }); const routes = new AtlasRoutes(atlas); const route = await routes.route({ origin: [-2.2511, 53.4747], destination: [-2.246, 53.4837] }); // route.guidance, route.plan (an AtlasRoutePlan), route.speedSections
final atlas = await AtlasConfiguration.forThisApp(apiKey: apiKey); final routes = AtlasRoutes.fromConfiguration(atlas); final route = await routes.route( origin: const AtlasCoordinate(-2.2511, 53.4747), destination: const AtlasCoordinate(-2.246, 53.4837), ); // route.guidance, route.plan (an AtlasRoutePlan), route.speedSections
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.
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.
Pass departureTime = Instant.parse("2026-12-01T08:00:00Z") to plan a later journey and trafficAware = true to allow for traffic.
Add departureTime: "2026-12-01T08:00:00Z" (ISO 8601) to plan a later journey and traffic: "aware" to allow for traffic.
Pass departureTime: (a DateTime) 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() }
val navigation = AtlasNavigation(atlas, listener = object : AtlasNavigationListener { override fun onUpdate(update: AtlasNavigationUpdate) { render(update.snapshot) } override fun onEffect(effect: AtlasNavigationEffect) { if (effect is AtlasNavigationEffect.Arrived) showArrival() } // The host rerouted: show the new route, and guide by its steps. override fun onRerouted(route: AtlasRoute, request: AtlasNavigationEffect.RequestReroute) { map.showRoute(route) } }) navigation.begin(route.plan) // GPS with a foreground service, so guidance carries on with the screen off: val gps = ForegroundLocationSource(context) gps.start { sample -> navigation.ingest(sample) } // and about once a second: navigation.tick(System.currentTimeMillis())
import { AtlasNavigation } from "@meridianatlas/react-native"; const navigation = new AtlasNavigation(bridges.navigation, atlas); // bridges: from step 1 await navigation.initialize(); navigation.subscribe((update) => { for (const effect of update.effects) { // The session rerouted: show the new route, and guide by its steps. if (effect.type === "route_replaced" && effect.route) showRoute(effect.route); if (effect.type === "arrived") showStatus("You have arrived"); } }); await navigation.begin(route.plan);
final navigation = AtlasNavigation(MethodChannelAtlasNavigationBridge(), configuration: atlas); await navigation.initialize(); navigation.updates().listen((update) { for (final effect in update.effects) { switch (effect.type) { // The session rerouted: show the new route, and guide by its steps. case AtlasNavigationEffectType.routeReplaced: if (effect.route case final route?) showRoute(route); case AtlasNavigationEffectType.arrived: showStatus('You have arrived'); default: break; } } }); await navigation.begin(route.plan);
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).
Permissions. The SDK's manifest declares the service and its permissions. Your app asks the user for ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION together before starting (Android 12 and later ignore a request for fine alone), and on Android 13 and later for POST_NOTIFICATIONS so the "Navigating" notification shows.
Permissions. The package runs GPS itself while a session is active. On iOS, add NSLocationWhenInUseUsageDescription and the location background mode; on Android, request ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION together at runtime and, on Android 13 and later, POST_NOTIFICATIONS.
Permissions. The plugin runs GPS itself while a session is active. On iOS, add NSLocationWhenInUseUsageDescription and the location background mode; on Android, request ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION together at runtime and, on Android 13 and later, POST_NOTIFICATIONS.
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)
val map = AtlasMapView(context, atlas, presentation = AtlasMapPresentation(navigationUI = true).toViewerParameters()) map.onError = { code, message -> showStatus("Map: $message") } container.addView(map) map.showRoute(route) // the AtlasRoute whose plan you began // in AtlasNavigationListener.onUpdate: map.update(update.snapshot) // when the screen goes for good: map.destroy()
import { requireNativeComponent } from "react-native"; import { ATLAS_MAP_VIEW, atlasMapPresentation, atlasMapRoute, type AtlasMapViewProps } from "@meridianatlas/react-native"; const AtlasMapView = requireNativeComponent<AtlasMapViewProps>(ATLAS_MAP_VIEW); // route: the AtlasRoute whose plan you began; snapshot: the latest update.snapshot from navigation.subscribe <AtlasMapView style={{ flex: 1 }} configuration={atlas} route={atlasMapRoute(route)} snapshot={snapshot} presentation={atlasMapPresentation({ style: "standard", navigationUI: true })} onMapError={(event) => showStatus(`Map: ${event.nativeEvent.message}`)} />
AtlasMapView( configuration: atlas, presentation: AtlasMapPresentation(style: AtlasMapStyle.standard, navigationUI: true), onCreated: (map) { map.showAtlasRoute(route); // the AtlasRoute whose plan you began map.errors.listen((error) => showStatus('Map: ${error.message}')); navigation.updates().listen((update) => 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.
Every service client throws AtlasException (the Android name for 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.
Every client 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), retryable says whether trying again later can work, and requestId is for support.
Every client throws AtlasException (the Flutter name for 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 }
try { routes.route(origin, destination) } catch (error: AtlasException) { if (error.code == "capability_required") showStatus("Turn on ${error.capability} for this key") else if (error.isRetryable) showStatus("No connection: try again") // network_error, request_timeout, rate_limit… else showStatus(error.message ?: error.code) // says what to fix, with a link }
import { AtlasError } from "@meridianatlas/react-native"; try { await routes.route({ origin, destination }); } catch (error) { if (!(error instanceof AtlasError)) throw error; if (error.code === "capability_required") showStatus(`Turn on ${error.capability} for this key`); else if (error.retryable) showStatus("No connection: try again"); // network_error, request_timeout, rate_limit… else showStatus(error.message); // says what to fix, with a link }
try { await routes.route(origin: origin, destination: destination); } on AtlasException catch (error) { if (error.code == 'capability_required') { showStatus('Turn on ${error.capability} for this key'); } else if (error.isRetryable) { showStatus('No connection: try again'); // network_error, request_timeout, rate_limit… } else { showStatus(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.