Meridian Atlas documentation
Atlas adds turn-by-turn navigation, a 3D map and speed limits to your iOS, Android, React Native or Flutter app, with web APIs for routes, places and road data. Offline downloads follow after launch. These docs cover version 0.1.0-rc.6 with the changes listed under Unreleased in the changelog.
Guides
How Atlas fits together
Atlas has two halves. On the device, navigation and free-drive sessions turn location fixes into a snapshot (where the car is on the route, what phase guidance is in) plus effects: requests for your app to act. On the server, the web APIs calculate routes, search places and return road data. The SDKs include clients for those APIs, so most apps never write an HTTP call.
- Sessions are state machines. They never ask for permissions, play audio or draw: your app owns those, and Atlas tells it what to do. Made with your configuration, a session makes two kinds of network call itself: it fetches its reroutes and registers its navigation legs.
- Who supplies the fixes. In React Native and Flutter the package runs GPS itself while a session is active. With the native iOS and Android SDKs, your app passes each fix in and calls
tickonce a second, so GPS loss is noticed. - Guidance text comes with the route. Each step has a ready-to-speak instruction. Show the next step whose
atMetresis beyond the session'sprogressM, and speak it at distances you choose. Speech and audio focus are your app's.
API keys and features
Every call needs an API key, sent as X-Atlas-Key. You choose the features each key can use when you create it in Atlas Studio. A call for a feature the key doesn't have fails with capability_required, and the error's capability names the feature to turn on.
| Kind | Use it in | Restrictions |
|---|---|---|
| Server key | Your backend | Any feature, including stop-order optimisation. Keep it in a secret store. |
| App key | iOS and Android apps | Limited to your iOS bundle IDs and Android package names, optionally pinned to your signing certificate. Can't use stop-order optimisation. 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, when the key is created. Rotating a key issues a replacement and leaves the old one working for 7 days, so you can ship the new one without downtime. The SDKs also send Atlas-Client (for example ios/0.1.0-rc.6) so support can see which SDK made a call.
Navigation
Get a route with AtlasRoutes, then pass its plan to AtlasNavigation.begin. Each update carries a snapshot with the phase (on_route, rerouting, gps_unavailable…), progressM and remainingM, and any effects.
let state = try navigation.begin(route.plan) // route from AtlasRoutes func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { locations.forEach { navigation.ingest($0) } } Timer.scheduledTimer(withTimeInterval: 1, repeats: true) { _ in navigation.tick() }
Guidance with the screen off
On Android, ForegroundLocationSource runs GPS with a location foreground service. Your app asks for ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION together (Android 12 and later ignore a request for fine alone), and on Android 13 and later for POST_NOTIFICATIONS so the "Navigating" notification shows. On iOS, add NSLocationWhenInUseUsageDescription and the location background mode. Without permission, no fixes arrive and the session reports gps_unavailable.
Tunnels
Through a tunnel, progress is estimated from the last speed for up to 5 minutes or 3.5 km, and positionEstimated is true: show the position as estimated. When GPS returns, the car is found again as far along as it could have driven.
Rerouting
Made with your configuration, the session reroutes by itself. When the car leaves the route it fetches a new one: from where the car is, facing the way it is going (so on a dual carriageway it starts on the car's own side), to the destination or the next stop, asked the way the route was (traffic, departure time, the side of the road to arrive on). Guidance keeps the old route until the new one arrives; the route_replaced update brings it, for your app to show.
- A car crawling off the route (a car park, a forecourt, a queue) isn't rerouted unless it has turned round, and GPS jitter at lights or between tall buildings doesn't reroute.
- A failed fetch is said (
reroute_failed, with the reason and when it will try again): the old route is kept, and the session asks again after 3 seconds, then 6, 12 and so on, up to a minute. No answer within 20 seconds counts as failed. - A fetch is dropped if the car comes back to the route (
reroute_cancelled), and its late reply is ignored. - Call
setConnectivity(false)when the app goes offline, and reroutes wait instead of failing. - To use your own routing, pass
rerouting(a handler, or manual to answer eachrequest_reroutewithcompleteRerouteorfailReroute); on Android, atransport.
Lane guidance
Each guidance step has laneGuidance and, where there is a sign, signpost. Lanes are always listed left to right in the direction of travel.
| Field | What it holds |
|---|---|
source | mapped (from lane markings mapped on the road), inferred (from the road layout) or none |
lanes | Every lane, with its arrows (indications) and destinations |
recommendedLaneIndexes | Every lane that works for the next manoeuvre |
preferredLaneIndex | The best of them: the one to underline |
drivingSide | left in the UK |
signpost | junction, refs (road numbers), destinations and numberLabel (junction or exit), as the sign shows them |
Offline packages don't include lanes yet, so offline steps have no lane advice.
The map view
AtlasMapView is the Atlas 3D map: a native view on iOS, Android and Flutter, and a native component in React Native. Show it the route you began (the AtlasRoute, not only its plan, so the route line moves into the lane each junction needs), then give it each snapshot to move the car. After a reroute, show the new route: it is swapped in place without reloading the map.
| Setting | Values |
|---|---|
style | standard (default) or neon-coast |
dimension | 2d or 3d |
buildings.display | extruded, footprints or hidden |
buildings.opacity | 0 to 1 |
Neon Coast is a flat style: asking for extruded buildings with it is an error on every platform. Day or night follows the sun unless you set it.
Free drive
AtlasFreeDrive follows the car with no destination and reports the current road's name, number and speed limit. When it needs the roads nearby it emits roads_needed with a centre and radiusM: fetch them with POST /v1/roads/nearby (the road_attributes feature) and pass them to setRoads. road_changed and speed_limit_changed tell you when to update the road label and the limit sign.
Offline After launch
Downloading and updating national offline packages comes after the first release: no SDK downloads packages over the network yet. What works today is routing on a package already installed on the device, with AtlasOfflineRoutes in React Native and Flutter and the offline engine on Android: the result is the same AtlasRoute as online.
- The iOS Swift package doesn't include offline yet.
- A signed freshness ticket keeps a package current for another 31 days, and a ticket older than the one held is refused. After launch, Atlas serves the tickets and the SDK fetches them.
- Refusals:
offline_freshness_invalid,_untrusted,_expiredand_rollback; a damaged package isoffline_package_unreadableoroffline_package_invalid.
Speed limits
Every route has speedSections (the limit over each stretch, with its unit) and speedLimitCoverage, which says how many sections have a known limit and whether the route is complete. In free drive, the snapshot's speedLimit is the current road's, such as { value: 30, unit: "mph" }.
UK limits come from mapped and official sources (mapped signs, traffic regulation orders and national limits), with a cautious fallback where a road's limit is unknown; speedLimitCoverage says how much of a route has a known limit. Responses carry the credits their sources need, and Atlas credits its data sources in the terms of service.
Errors
Every client throws one error type (AtlasError on iOS and React Native, AtlasException on Android and Flutter) with the same code on every platform, a message that says what to fix and links to that code's entry in Errors, whether trying again later can work (isRetryable; retryable in TypeScript), and a requestId to quote to support.
| Code | Meaning |
|---|---|
missing_api_key | The configuration's key is empty (nothing was sent) |
invalid_api_key | The key is wrong, revoked or expired |
capability_required | The key doesn't have this feature; capability names it |
app_not_allowed | The key is limited to other apps. Make clients from the configuration, so they send your app; on Android, add each signing certificate's SHA-256 (debug and release) to the key |
billing_inactive, usage_policy_required, usage_allowance_exhausted | The account can't be charged for this call |
rate_limit | Too many requests; retryAfterSeconds says when to try again |
outside_coverage | The origin or destination is outside the area Atlas routes (the UK at launch) |
route_unresolved | No route between those points |
wrong_service_address | Something answered at the service address, but not the Atlas service |
request_timeout, network_error | No answer in time, or no connection (try again) |
invalid_request | Refused as malformed (also thrown before sending) |
invalid_response | The answer couldn't be read |
service_error | Anything else; status has the HTTP status (try again when it is 500 or more) |
Navigation reports location_permission_required and location_accuracy_reduced when the user hasn't allowed precise location, and the map viewer_unavailable when its viewer doesn't load. Calls billed per request send an Idempotency-Key; pass your own UUID to make a retry count once.
Reference
The API reference is generated from the source of each package, so it always matches the release you install. The hosted reference is published with the first release; until then it ships inside each release archive.
iOS (Swift)
DocC reference for the MeridianAtlas package: AtlasRoutes, AtlasNavigation, AtlasMapView, AtlasFreeDrive and the service clients.
Android (Kotlin)
Dokka reference for atlas-android and the atlas-core sessions it re-exports, such as AtlasNavigationSession.
React Native
The package's TypeScript declarations: classes, the native bridges, ATLAS_MAP_VIEW and every type.
Flutter
dartdoc reference for meridian_atlas, including the method-channel bridges and AtlasMapView.
REST API
Generated from the OpenAPI documents: the REST API reference (routes, matrices, traffic, legs, roads and more) and the Places API reference, with each endpoint's feature and what it is billed on. The APIs page has the overview.
Sample apps
Example apps for Flutter and React Native show navigation, free drive and the map, and run on the iOS simulator and the Android emulator. The quickstarts in the SDK docs are compiled and run by our test suite, and the samples on this site are copied from them.