Feature switches
Every option in the Meridian Atlas SDKs that turns something on or off, or tunes it: what it does, what you get when you leave it out, and the line that sets it on iOS (Swift), Android (Kotlin), React Native and Flutter. Each sample on this page is compiled by its SDK's own build, as the quickstarts' are. Where an SDK doesn't have an option yet, the page says so, and Gaps between the SDKs lists them all.
When something doesn't work, see Troubleshooting; for a failure's code, Errors.
How to read this page
- Defaults. "Default" is what you get when you leave the option out. None of these needs setting for a first route, guidance and the map: a key is enough.
- Names. The samples use the quickstarts' names:
atlasis your configuration,mapyour map view (Flutter: theAtlasMapControlleritsonCreatedgives you),navigationyour navigation session,voiceyourAtlasVoice,routeanAtlasRoutefromAtlasRoutes, andcarPlayorcaryour car screen. - The map's presentation. Most of the map's switches are on its presentation, which a map view reads once, when it starts. Make the map with it:
let presentation = try AtlasMapPresentation(navigationUI: true)
let map = try AtlasMapView(configuration: atlas, presentation: presentation)val presentation = AtlasMapPresentation(navigationUI = true)
val map = AtlasMapView(context, atlas, presentation = presentation.toViewerParameters())import { atlasMapPresentation } from "@meridianatlas/react-native";
// AtlasMapView: requireNativeComponent(ATLAS_MAP_VIEW), as the quickstart makes it
const view = <AtlasMapView configuration={atlas} presentation={atlasMapPresentation({ navigationUI: true })} />;AtlasMapView(
configuration: atlas,
presentation: AtlasMapPresentation(navigationUI: true),
onCreated: (map) {},
)Day and night (Day and night) is the one presentation setting a map also takes while it
shows. For the others, make a new map view. A presentation the SDK can't use is refused when you make it: Swift
throws AtlasMapPresentationError, Kotlin IllegalArgumentException, React Native AtlasMapPresentationError,
Flutter ArgumentError.
At a glance
| Switch | Default | Missing on |
|---|---|---|
| Built-in guidance panels | Off | |
| Choosing panels | All of them | |
| Banner, lanes, camera alerts, speed, trip progress | On (with the panels) | |
| Recentre, Route overview, Mute, Arrival card | On (with the panels) | |
| End | Shown once your app takes it | |
| Retry | Shown once your app takes it (Swift, Kotlin); always (React Native, Flutter) | Can't be turned off in React Native and Flutter |
| Day and night | auto | |
| Map style | standard | |
| 2D or 3D | 3D | |
| Buildings | Extruded (flat in 2D and Neon Coast), opaque | |
| Quality | auto | |
| Auto-recentre | Off | |
| Overview and recentre from your own controls | ||
| Your views over the map | No insets | |
| Large text | Follows the system, up to 1.5× | No switch on any SDK |
| Units | Miles, yards and mph on the phone | No switch on any SDK |
| Automatic rerouting | On with a configuration | No manual mode on Kotlin (a transport answers) |
| Your own routing for reroutes | Off | |
| Retry a reroute now | ||
| Offline: reroutes wait | Online | A helper on Kotlin only (AtlasNetworkCallback) |
| Navigation legs | On with a configuration | |
| Traffic-aware routes | Not asked for | |
| Side of the road on arrival | Either side | |
| Quickest or shortest | Quickest | |
| Planned departure | Now | |
| Starting the way the car faces | Any way (reroutes: the car's) | |
| Who runs GPS | Your app (Swift, Kotlin); the package (React Native, Flutter) | |
| Guidance with the screen off | Off until your app is set up for it | |
| The Navigating notification | "Navigating", the SDK's arrow | Android only |
| Dead reckoning through tunnels | On, 5 minutes or 3.5 km | Tunable on Kotlin's core only |
| Spoken guidance | Off (opt-in) | |
| Choosing a voice | The best installed British voice | |
| Muting the voice | Not muted | |
| SSML | On | |
| Your own speech | The device's speech | |
| Android's speech engine | The user's default | Kotlin only |
| Personal Voice | Not asked | iOS only |
| Your audio while Atlas speaks | Untouched | |
| Speed tolerance | 0 | |
| Camera speech | On | |
| Over-limit chime | Off | |
| Speed alerts to your app | ||
| Car screen speed limit sign | On | |
| Car screen camera alerts | On where lawful | No switch on any SDK |
| Car screen day and night | auto (the car's) | |
| Car screen map | The standard 3D map | |
| Dashboard and instrument cluster maps | 2D, flat, low quality | Swift only |
| Guidance card colour | Meridian navy | Android Auto |
| Retry on the car screen | Shown once your app takes it (Swift, Kotlin); always (React Native, Flutter) | |
| Car screen voice | Silent | No car screen voice on React Native and Flutter (your phone's voice speaks) |
| Android Auto hosts | Any host in debug builds; the Car App Library's list in release | |
| Simulated drives | Off | |
| GPS noise in simulated drives | Exact fixes | |
| Replaying a recorded drive | ||
| Simulate drive on the phone's map | Off | |
| Simulate on the car screen | Off | |
| Plain HTTP to your computer | HTTPS only | |
| Your own HTTP | The platform's | |
| Logs | A few lines, no switch | No switch on any SDK |
| Inspecting the map's web view | Off | Android only |
| Service address | https://api.meridianatlas.dev | |
| Map viewer address | https://maps.meridianatlas.dev/v1 | |
| Request deadline | 30 seconds | Per call on React Native, Flutter and servers only |
| Your app's identity | Sent | |
| Idempotency keys | One per billed call | |
| What the SDK retries by itself | No automatic retry of service calls on any SDK | |
| Offline routing | Online | Not in the Swift package |
| Server client |
Guidance panels
The map's built-in Meridian panels, drawn in the map view and read by VoiceOver and TalkBack. They keep clear of the system's bars, the Dynamic Island, notches and cut-outs by themselves, and of your own views when you say where they are (Your views over the map).
Built-in guidance panels
navigationUI on the map presentation puts the panels on the map: the manoeuvre banner, lanes, camera alerts,
the speed with the limit, trip progress, Recentre, Route overview, Mute, the arrival card and End. Left off, the
map shows the route and the car only, for apps that draw their own.
Default: off.
let presentation = try AtlasMapPresentation(navigationUI: true)val presentation = AtlasMapPresentation(navigationUI = true)import { atlasMapPresentation } from "@meridianatlas/react-native";
const presentation = atlasMapPresentation({ navigationUI: true });final presentation = AtlasMapPresentation(navigationUI: true);Without the panels, your own panels' accessibility is yours: the map reads as one element, "Map".
Choosing panels
navigationPanels lists the panels that show with navigationUI; leave out the ones your app draws itself.
Each panel's name:
| Panel | Swift | Kotlin | React Native | Flutter |
|---|---|---|---|---|
| Banner | .banner | BANNER | "banner" | banner |
| Lanes | .lanes | LANES | "lanes" | lanes |
| Camera alerts | .cameraAlerts | CAMERA_ALERTS | "camera_alerts" | cameraAlerts |
| Speed | .speed | SPEED | "speed" | speed |
| Trip progress | .tripProgress | TRIP_PROGRESS | "trip_progress" | tripProgress |
| Recentre | .recentre | RECENTRE | "recentre" | recentre |
| Mute | .mute | MUTE | "mute" | mute |
| Arrival card | .arrival | ARRIVAL | "arrival" | arrival |
| Route overview | .overview | OVERVIEW | "overview" | overview |
| End | .end | END | "end" | end |
Default: all of them. For example, everything but trip progress:
let presentation = try AtlasMapPresentation(navigationUI: true, navigationPanels: AtlasNavigationPanels.all.subtracting(.tripProgress))val presentation = AtlasMapPresentation(navigationUI = true,
navigationPanels = AtlasNavigationPanel.entries.toSet() - AtlasNavigationPanel.TRIP_PROGRESS)import { ATLAS_NAVIGATION_PANELS, atlasMapPresentation } from "@meridianatlas/react-native";
const presentation = atlasMapPresentation({
navigationUI: true,
navigationPanels: ATLAS_NAVIGATION_PANELS.filter((panel) => panel !== "trip_progress"),
});final presentation = AtlasMapPresentation(
navigationUI: true, navigationPanels: {...AtlasNavigationPanel.values}..remove(AtlasNavigationPanel.tripProgress));Two panels lean on others: Route overview needs Recentre (the way back from it), and End sits on the trip panel, so it needs trip progress.
Banner
The manoeuvre in the route's own words ("At the traffic lights, turn right onto Ormskirk Road"), with the distance, the road's numbers as sign patches, the sign at a fork and a roundabout's exit, and "then" when the next manoeuvre follows close behind. Also the guidance status line ("Locating…", "No GPS signal", "Finding a new route…", "Can't find a route").
Default: on with the panels. Leave it out with banner (Choosing panels), and draw your
own from each step's instruction, roadName and roadNumbers, and the snapshot's status.
Lanes
The lane strip under the banner: every lane, the ones to use bright and the best one underlined, as the route's
laneGuidance has them. Offline routes have no lanes, so it doesn't show on them.
Default: on with the panels. Leave it out with lanes.
Camera alerts panel
A line under the banner when a speed camera is ahead: "Speed camera · 30 mph", how far, and inside an average speed check, the average so far. Only where warning of cameras is lawful (the UK and Ireland).
Default: on with the panels. Leave it out with camera_alerts (Swift .cameraAlerts). Leaving the panel out
doesn't stop the voice saying cameras (Camera speech) or the map telling your app
(Speed alerts to your app).
Speed panel
The car's speed beside a road sign of the limit, in Meridian's danger colour once the driver is over the limit (by the shown number, plus your speed tolerance), and a lower limit ahead. Where the limit isn't known there is no sign and no over the limit: the SDK never guesses one.
Default: on with the panels. Leave it out with speed.
Trip progress
At the bottom of the screen: the arrival time, time and distance left, and on a multi-stop trip the next stop ("Stop 2 of 4") and the destination. It names your places when you give them:
map.show(route, destination: AtlasMapPlace(name: "Interact CC Wigan", address: "Wallgate, Wigan WN1 1BA"))map.showRoute(route, destination = AtlasMapPlace("Interact CC Wigan", "Wallgate, Wigan WN1 1BA"))import { atlasMapRoute } from "@meridianatlas/react-native";
const view = <AtlasMapView configuration={atlas} route={atlasMapRoute(route, { destination: { name: "Interact CC Wigan" } })} />;await map.showAtlasRoute(route, destination: const AtlasMapPlace('Interact CC Wigan', address: 'Wallgate, Wigan WN1 1BA'));Default: on with the panels, the destination unnamed. Leave it out with trip_progress (Swift
.tripProgress); End goes with it.
Recentre
Shown once the driver pans or pinches the map, and in the route overview; it brings the camera back to the car at its own distance, tilt and heading.
Default: on with the panels. Leave it out with recentre: then the map doesn't move under the driver's
fingers at all, and the Route overview button doesn't show. For your own button, see
Overview and recentre from your own controls.
Route overview button
A compact round button, in Recentre's place while the camera follows the car on a route: the whole remaining route, flat and north-up, clear of the panels. Guidance and the voice carry on.
Default: on with the panels. Leave it out with overview. It needs recentre.
Mute button
Mutes and unmutes the voice. Attach your AtlasVoice and the button and the voice follow each other, with
nothing more to write:
map.voice = voicemap.voice = voiceimport { atlasMapPresentation } from "@meridianatlas/react-native";
// deviceVoice: the mute button mutes and unmutes the device voice, new AtlasVoice(bridges.voice)
const view = <AtlasMapView configuration={atlas} presentation={atlasMapPresentation({ navigationUI: true })} deviceVoice />;map.voice = voice;Default: on with the panels, and no voice attached (the button then only reports taps). With speech of your
own, pass the taps on (onVoiceMutedChanged; Flutter voiceMutedChanges), and show your own setting on the
button (Swift and Kotlin map.isVoiceMuted, React Native's voiceMuted prop, Flutter map.setVoiceMuted).
Leave the button out with mute.
Arrival card
At each stop of a multi-stop trip, Next stop and End; at the destination, End. Guidance carries on to the next stop by itself; End is yours to act on:
map.onArrivalAction = { action in
if case .end = action { _ = try? navigation.stop() }
}map.onArrivalAction = { action -> if (action is AtlasArrivalAction.End) navigation.stop() }const view = <AtlasMapView configuration={atlas}
onArrivalAction={({ nativeEvent }) => { if (nativeEvent.action === "end") void navigation.stop(); }} />;map.arrivalActions.listen((action) {
if (action.kind == AtlasArrivalActionKind.end) navigation.stop();
});Default: on with the panels. Leave it out with arrival.
End on the trip panel
A compact round End at the trip panel's left, so the driver can end guidance without leaving the map. It calls your app, which ends guidance; the map changes nothing by itself. It shows only once your app takes it, so there is never an End that does nothing:
map.onEndGuidance = { _ = try? navigation.stop() }map.onEndGuidance = { navigation.stop() }const view = <AtlasMapView configuration={atlas} onEndGuidance={() => void navigation.stop()} />;map.endGuidanceRequests.listen((_) => navigation.stop());Default: not shown until your app takes it. Leave end out of the panels to keep your own End while you
still listen. Once the car arrives, the arrival card's End takes over. An older viewer, without the
endGuidance capability, shows no End.
Retry button
After two reroutes in a row fail, the banner says "Can't find a route" and offers Retry, which asks the session for a new route at once. On Swift and Kotlin it shows once your app takes it:
map.onRetryReroute = { navigation.retryReroute() }map.onRetryReroute = { navigation.retryReroute() }React Native and Flutter: the plugin's map takes Retry itself, so there is nothing to write.
Default: Swift and Kotlin, no Retry (the session keeps trying by itself, after 3 seconds, then 6, 12 and so on up to a minute); React Native and Flutter, always shown. Not switchable on React Native and Flutter.
Map
Day and night
appearance says when the map and its panels are dark:
| Value | Night |
|---|---|
auto | When the phone is in dark mode, and from civil dusk to civil dawn where the car is, whatever the phone is in |
system | When the phone is in dark mode (or your app's own override of it) |
day, night | Never, always |
Set it on the presentation, or at any time while the map shows: the map and its panels switch in place, with no reload, the route and the camera as they were.
map.appearance = .night // .auto turns automatic day and night on againmap.appearance = AtlasMapAppearance.NIGHT // AUTO turns automatic day and night on againimport { atlasMapPresentation } from "@meridianatlas/react-native";
// The map takes a new presentation's appearance whenever it changes ("auto" turns automatic on again).
const presentation = atlasMapPresentation({ navigationUI: true, appearance: "night" });await map.setAppearance(AtlasMapAppearance.night); // AtlasMapAppearance.auto turns automatic on againDefault: auto. The sun is worked out on the device, with no network. Car screens follow the car, not the
phone's map: see Car screen day and night.
Map style
style: standard (Atlas's own palette) or neon-coast (a light, minimal grey map by day, near-black navy by
night, a hot-pink route).
let presentation = try AtlasMapPresentation(style: .neonCoast)val presentation = AtlasMapPresentation(style = AtlasMapStyle.NEON_COAST)import { atlasMapPresentation } from "@meridianatlas/react-native";
const presentation = atlasMapPresentation({ style: "neon-coast" });final presentation = AtlasMapPresentation(style: AtlasMapStyle.neonCoast);Default: standard. Neon Coast is a flat map: its buildings default to flat, and asking for extruded ones
with it is refused.
2D or 3D
dimension: the 3D map, or a flat 2D one.
let presentation = try AtlasMapPresentation(dimension: .twoDimensional)val presentation = AtlasMapPresentation(dimension = AtlasMapDimension.TWO_DIMENSIONAL)import { atlasMapPresentation } from "@meridianatlas/react-native";
const presentation = atlasMapPresentation({ dimension: "2d" });final presentation = AtlasMapPresentation(dimension: AtlasMapDimension.twoDimensional);Default: 3D. The 2D map's buildings default to flat; extruded buildings in 2D are refused.
Buildings
buildingDisplay (extruded, flat footprints or hidden) and buildingOpacity (0 to 1).
let presentation = try AtlasMapPresentation(buildingDisplay: .footprints, buildingOpacity: 0.6)val presentation = AtlasMapPresentation(buildingDisplay = AtlasBuildingDisplay.FOOTPRINTS, buildingOpacity = 0.6)import { atlasMapPresentation } from "@meridianatlas/react-native";
const presentation = atlasMapPresentation({ buildingDisplay: "footprints", buildingOpacity: 0.6 });final presentation = AtlasMapPresentation(buildingDisplay: AtlasBuildingDisplay.footprints, buildingOpacity: 0.6);Default: extruded on the 3D standard map, flat footprints in 2D and with Neon Coast; fully opaque.
Quality
quality: how much the map spends on each frame. auto starts from what the device says about itself and steps
down a tier when frames stay slow (a quality_reduced warning); high, balanced and low hold one tier.
let presentation = try AtlasMapPresentation(quality: .balanced)val presentation = AtlasMapPresentation(quality = AtlasMapQuality.BALANCED)import { atlasMapPresentation } from "@meridianatlas/react-native";
const presentation = atlasMapPresentation({ quality: "balanced" });final presentation = AtlasMapPresentation(quality: AtlasMapQuality.balanced);Default: auto. Which tier the map started at: Swift and Kotlin map.quality, React Native onMapReady's
nativeEvent.quality, Flutter map.quality, once it is ready.
Auto-recentre
autoRecentreAfter brings the camera back to the car that long after the map was last moved: the driver's pan
or pinch (from when the finger lifts), the overview, or a car screen's map buttons. It waits while a finger is
on the map, and while no updates are arriving (a parked car). 2 to 600 seconds; anything else is refused.
let presentation = try AtlasMapPresentation(navigationUI: true, autoRecentreAfter: 10)val presentation = AtlasMapPresentation(navigationUI = true, autoRecentreAfterSeconds = 10.0)import { atlasMapPresentation } from "@meridianatlas/react-native";
const presentation = atlasMapPresentation({ navigationUI: true, autoRecentreAfterSeconds: 10 });final presentation = AtlasMapPresentation(navigationUI: true, autoRecentreAfter: const Duration(seconds: 10));Default: off: the camera stays where the driver left it until they tap Recentre. The car screens take it from their own map's presentation (Car screen map).
Overview and recentre from your own controls
For buttons of your own: show the whole remaining route, and bring the camera back to the car, as the panels'
buttons do. Each map also says when the camera stops following the car and when the overview starts and ends,
whoever did it (onFollowingChanged, onOverviewChanged; Flutter followingChanges, overviewChanges).
map.showOverview()
map.recentre()map.showOverview()
map.recentre()import { useState } from "react";
const [overviewKey, setOverviewKey] = useState(0);
const [recentreKey, setRecentreKey] = useState(0);
const view = <AtlasMapView configuration={atlas} overviewKey={overviewKey} recentreKey={recentreKey} />;
setOverviewKey((key) => key + 1); // a new key: the overview
setRecentreKey((key) => key + 1); // a new key: back to the carawait map.showOverview();
await map.recentre();The overview does nothing without a route (free drive). The car screens have the same two calls
(showOverview() and recentre() on AtlasCarPlay, AtlasCar and AtlasCarScreen).
Your views over the map
Lay the map out edge to edge. If your own views cover part of it (a toolbar, a bottom sheet, buttons), say how much at each edge, measured from the map's edges: the panels keep clear of them, and the camera keeps the car in the part of the map left clear. Set it again when your views move.
map.setInsets(UIEdgeInsets(top: 0, left: 0, bottom: 120, right: 0)) // pointsmap.setInsets(0.0, 0.0, 120.0, 0.0) // dp: top, left, bottom, rightconst view = <AtlasMapView configuration={atlas} insets={{ bottom: 120 }} />;await map.setInsets(const EdgeInsets.only(bottom: 120));Default: none. The status bar, the Dynamic Island, a notch or camera cut-out and the home indicator or navigation bar need no insets: the map knows them, upright and on its side. At each edge the larger of the two counts, so a toolbar under the status bar is the status bar's height plus the toolbar's.
Large text
The panels' text follows Dynamic Type and Android's font size, up to 1.5 times its default. Where the panels would overlap or leave too little map, the text steps back towards its default size, then the panels go compact (the instruction on one line, the trip panel without its stop names, Recentre as an icon).
Default: follows the system. No switch on any SDK: an app can't hold the panels' text at one size.
Units
The phone's panels show distances in miles and yards and speeds in mph. CarPlay and Android Auto show distances in the driver's units by the phone's region (miles and yards in the UK, kilometres where signs use them).
No switch on any SDK. Speed alerts carry their unit, so your own panel can say it.
Guidance
Automatic rerouting
A navigation session made with a configuration 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, asked the way the route was, and route_replaced brings
it for your map. Turn it off to answer each request_reroute yourself:
let manual = AtlasNavigation(configuration: atlas, rerouting: .manual)import { AtlasNavigation } from "@meridianatlas/react-native";
const manual = new AtlasNavigation(bridges.navigation, atlas, undefined, { rerouting: "manual" });final manual = AtlasNavigation(MethodChannelAtlasNavigationBridge(), configuration: atlas, rerouting: AtlasRerouting.manual);Kotlin has no manual mode as such: give the host a transport, which is called for each reroute (Your own routing for reroutes).
Default: on with a configuration; off (manual) without one. Manual answers are completeReroute(requestId, route) and failReroute(requestId, error); a request left unanswered for 20 seconds counts as failed.
Your own routing for reroutes
Your routing, run the way automatic rerouting is: one fetch at a time, dropped when the car comes back to the route, a failure backed off and asked again.
let custom = AtlasNavigation(configuration: atlas, rerouting: .custom { effect in
try await yourRouter.route(from: effect.origin!, to: effect.destination!, heading: effect.headingDegrees)
})val custom = AtlasNavigation(atlas, transport = transport, listener = listener)import { AtlasNavigation } from "@meridianatlas/react-native";
const custom = new AtlasNavigation(bridges.navigation, atlas, undefined, {
rerouting: (effect) => yourRouter.route(effect.origin!, effect.destination!, effect.headingDegrees ?? null),
});final custom = AtlasNavigation(MethodChannelAtlasNavigationBridge(), configuration: atlas,
rerouting: AtlasRerouting.custom((effect) => yourRouter.route(effect.origin!, effect.destination!, effect.headingDegrees)));Default: off. The Kotlin transport is in the Android quickstart.
Retry a reroute now
After reroutes have failed, ask for a new route at once instead of at the session's next try (the driver's Retry):
navigation.retryReroute()navigation.retryReroute()await navigation.retryReroute();await navigation.retryReroute();Default: the session tries again by itself after 3 seconds, then 6, 12 and so on, up to a minute. The map's and car screens' Retry buttons call this (Retry button).
Offline: reroutes wait
Tell the session when the device has no connection: off the route, it waits ("Offline", reroute_deferred)
instead of failing, and fetches when you say it is back.
navigation.setConnectivity(false) // true when the connection is backimport android.net.ConnectivityManager
// AtlasNetworkCallback calls setConnectivity for you, from Android's own network callbacks.
context.getSystemService(ConnectivityManager::class.java)?.registerDefaultNetworkCallback(AtlasNetworkCallback(navigation))await navigation.setConnectivity(false); // true when the connection is backawait navigation.setConnectivity(false); // true when the connection is backDefault: online. Only Kotlin has a helper that follows the network; on Swift, React Native and Flutter your
app calls setConnectivity from its own network monitor.
Navigation legs
Guidance is charged per navigation leg: guidance to one destination, with up to 50 reroutes included. A session
made with a configuration registers its leg itself when guidance begins, sends it on every reroute and ends it
on arrival or stop(); a multi-stop trip has a leg per stop. To turn that off, make the session without a
configuration:
let navigation = AtlasNavigation(rerouting: .manual, onUpdate: { update in /* ... */ })val navigation = AtlasNavigation(transport, listener)import { AtlasNavigation } from "@meridianatlas/react-native";
const navigation = new AtlasNavigation(bridges.navigation);final navigation = AtlasNavigation(MethodChannelAtlasNavigationBridge());Default: on with a configuration. Without one the session contacts no server: it registers no leg and
fetches no reroute, and your app does both by hand (AtlasNavigationLegs and routes.reroute(effect); each
quickstart's "Navigation legs"). Reroutes without a leg are charged as routes.
Traffic-aware routes
Ask for a route that allows for traffic. The route's plan keeps it, so its reroutes are asked for the same way.
let route = try await routes.route(from: origin, to: destination, trafficAware: true)val route = routes.route(origin, destination, trafficAware = true) // off the main threadconst route = await routes.route({ origin, destination, traffic: "aware" });final route = await routes.route(origin: origin, destination: destination, trafficAware: true);Default: not asked for. The delay on a route you already have is a separate call, AtlasTraffic, which
needs the key's Traffic feature (traffic).
Side of the road on arrival
approach: curb arrives with the destination on the driver's side of the road (the left in the UK), for
deliveries and drop-offs.
let route = try await routes.route(from: origin, to: destination, approach: .curb)val route = routes.route(origin, destination, approach = AtlasApproach.CURB)const route = await routes.route({ origin, destination, approach: "curb" });final route = await routes.route(origin: origin, destination: destination, approach: AtlasApproach.curb);Default: either side, whichever is quicker (unrestricted). Reroutes keep it.
Quickest or shortest
let route = try await routes.route(from: origin, to: destination, profile: .shortest)val route = routes.route(origin, destination, profile = AtlasRouteProfile.SHORTEST)const route = await routes.route({ origin, destination, profile: "shortest" });final route = await routes.route(origin: origin, destination: destination, profile: AtlasRouteProfile.shortest);Default: quickest. Reroutes keep it.
Planned departure
Plan a later journey. A reroute moves the departure on by the time guidance has run.
let route = try await routes.route(from: origin, to: destination, departureTime: Date(timeIntervalSinceNow: 3600))val route = routes.route(origin, destination, departureTime = java.time.Instant.now().plusSeconds(3600))const route = await routes.route({ origin, destination, departureTime: "2026-12-03T08:00:00Z" });final route = await routes.route(origin: origin, destination: destination, departureTime: DateTime.now().add(const Duration(hours: 1)));Default: now.
Starting the way the car faces
heading (degrees, 0 is north) starts the route on a road going the car's way, so on a dual carriageway it
starts on the car's own side.
let route = try await routes.route(from: origin, to: destination, heading: 90)val route = routes.route(origin, destination, heading = 90.0)const route = await routes.route({ origin, destination, heading: 90 });final route = await routes.route(origin: origin, destination: destination, heading: 90);Default: none for a first route. Reroutes send the car's own heading (its GPS course, or the way it has moved) by themselves, and the service starts within 60° of it.
Who runs GPS
| SDK | Who supplies the fixes |
|---|---|
| iOS (Swift) | Your app: your CLLocationManager's fixes into navigation.ingest(location), and navigation.tick() about once a second |
| Android (Kotlin) | Your app: ForegroundLocationSource (below) or your own fused-location fixes into host.ingest, and tick about once a second |
| React Native, Flutter | The package, while a session is active (high accuracy; on Android a foreground service keeps it going with the screen off) |
manager.desiredAccuracy = kCLLocationAccuracyBestForNavigation
manager.activityType = .automotiveNavigation
manager.pausesLocationUpdatesAutomatically = false // else iOS pauses fixes in a long queue
manager.showsBackgroundLocationIndicator = true
manager.startUpdatingLocation()val gps = ForegroundLocationSource(context)
gps.checkAvailable() // location_permission_required or location_accuracy_reduced
gps.start { sample -> navigation.ingest(sample) } // and gps.stop() when guidance endsReact Native and Flutter: nothing to write; your app asks for location permission, and begin() refuses
without it.
Default: as in the table. The session refuses fixes worse than 30 m or more than 5 seconds old, so a phone's first Wi-Fi or cell estimates don't count ("Locating…").
Guidance with the screen off
- iOS (all SDKs): the
locationentry inUIBackgroundModes(Signing & Capabilities > Background Modes > Location updates). With the Swift package, alsomanager.allowsBackgroundLocationUpdates = true, which traps without the background mode. To speak with the screen locked, theaudiobackground mode too. - Android:
ForegroundLocationSource(Kotlin) and the plugins run a location foreground service with a "Navigating" notification. Ask forPOST_NOTIFICATIONSon Android 13 and later so the notification shows.
Default: off until your app is set up for it.
The Navigating notification
Android only, every SDK: the foreground service's notification. Translate or rebrand its text in your app's
strings.xml, and give it your own small icon (white on transparent):
<!-- res/values/strings.xml -->
<string name="atlas_navigation_notification_title">Guiding you</string>
<string name="atlas_navigation_channel_name">Turn-by-turn</string>
<!-- AndroidManifest.xml, inside <application> -->
<meta-data android:name="dev.meridianatlas.notification_icon" android:resource="@drawable/ic_navigation" />Default: "Navigating", in a channel called "Navigation", with the SDK's monochrome arrow.
Dead reckoning through tunnels
When GPS goes, the session carries the car on along the route at its last speed (positionEstimated is true),
for up to 5 minutes or 3.5 km, then says "No GPS signal".
Default: on, on every SDK. Only Kotlin's core session can be tuned, through the host's session:
// AtlasNavigationConfig.SDK is what every SDK runs; deadReckoningMaxMs = 0 turns dead reckoning off.
val navigation = AtlasNavigation(atlas, listener = listener,
session = AtlasNavigationSession(AtlasNavigationConfig.SDK.copy(deadReckoningMaxMs = 0)))The other fields of AtlasNavigationConfig (off-route evidence, arrival radius, reroute back-off) are pinned by
the shared conformance tests: change them only if you know why.
Voice
Spoken guidance
Each update can carry announcements ("In 300 yards, turn left onto Deansgate, the A fifty-six"). AtlasVoice
says them with the best installed British voice, and never touches your audio session or audio focus.
let voice = AtlasVoice()
let navigation = AtlasNavigation(configuration: atlas, onUpdate: { update in voice.handle(update) })val voice = AtlasVoice(context) // in AtlasNavigationListener.onUpdate: voice.handle(update)import { AtlasVoice } from "@meridianatlas/react-native";
const voice = new AtlasVoice(bridges.voice);
navigation.subscribe((update) => { void voice.handle(update); });final voice = AtlasVoice();
navigation.updates().listen(voice.handle);Default: off: nothing is said unless your app makes a voice and hands it updates. A hand-made route plan
without guidance is guided in silence. On Android, voice.shutdown() when the screen goes for good.
Choosing a voice
The installed voices, best first, and the one to use:
voice.selectedVoiceId = voice.voices(AtlasVoiceFilter(locale: "en-GB", minimumQuality: "enhanced")).first?.idvoice.selectedVoiceId = voice.voices(AtlasVoiceFilter(locale = "en-GB", minimumQuality = "enhanced")).firstOrNull()?.idconst voices = await voice.voices({ locale: "en-GB", minimumQuality: "enhanced" });
await voice.selectVoice(voices[0]?.id ?? null);final voices = await voice.voices(locale: 'en-GB', minimumQuality: 'enhanced');
await voice.selectVoice(voices.isEmpty ? null : voices.first.id);Default: Atlas's choice, the best installed British voice. preview says a sample. Premium and Enhanced
voices on iOS, and Google's British voices on Android, may need a download in the phone's settings. On
Android, a network voice is used only while the device is online.
Muting the voice
voice.isMuted = truevoice.isMuted = trueawait voice.setMuted(true);await voice.setMuted(true);Default: not muted. Announcements while muted are dropped, not saved for later. A voice attached to the map shows its state on the mute button.
SSML
The SSML form of each announcement: short pauses, and road letters said as letters.
voice.usesSSML = false // the plain text is saidvoice.usesSsml = false // your own output gets the plain text onlyawait voice.setSsml(false);await voice.setSsml(false);Default: on. On iOS the device's speech uses it from iOS 16; Android's speech engine is always given the plain text, which is written as it is said, so there it only changes what your own output gets.
Your own speech
Atlas still decides what to say and when; your speech (a cloud neural voice, expo-speech, flutter_tts) says
it, finishing when it has been said.
let voice = AtlasVoice(output: output) // output: speak(text:ssml:completion:) and stop()val voice = AtlasVoice(output) // output: speak(text, ssml, completion) and stop()import { AtlasVoice } from "@meridianatlas/react-native";
const voice = new AtlasVoice({ speak: async (text, ssml) => { /* say it; resolve when said */ } });final voice = AtlasVoice.custom(speak: (text, ssml) async {/* say it; complete when said */});Default: the device's speech. Or skip AtlasVoice and say each announcement's text (or ssml) yourself.
Android's speech engine
Kotlin only: which installed text-to-speech engine says the announcements, by package name.
val voice = AtlasVoice(context, engine = "com.google.android.tts")Default: the user's default engine. Not on React Native or Flutter yet (their Android voice uses the default engine).
Personal Voice
iOS 17 and later: asks the user to let your app speak with their own Personal Voice, which then appears among the voices.
voice.requestPersonalVoiceAuthorization { status in log(status) }await voice.requestPersonalVoice();await voice.requestPersonalVoice();Default: not asked. iOS only (there is no Personal Voice on Android).
Your audio while Atlas speaks
Atlas never sets the audio session (iOS) or takes audio focus (Android): ducking or pausing your own audio is yours. It tells you before and after each announcement:
voice.onWillSpeak = { _ in /* duck your own audio */ }
voice.onDidSpeak = { _, _ in if !voice.isSpeaking { /* restore it */ } }voice.listener = object : AtlasVoiceListener {
override fun onWillSpeak(announcement: AtlasAnnouncement) { /* request AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK */ }
override fun onDidSpeak(announcement: AtlasAnnouncement, interrupted: Boolean, speaking: Boolean) {
if (!speaking) { /* abandon it */ }
}
}voice.subscribe((event) => {
// will_speak: duck your own audio; did_speak with speaking false: restore it
});voice.events.listen((event) {
// willSpeak: duck your own audio; didSpeak with speaking false: restore it
});Default: your audio is untouched. On iOS, to speak with the screen locked, set a session that plays in the
background (.playback, mode .voicePrompt, option .duckOthers) and add the audio background mode. On
Android the speech is marked as navigation guidance, so it reaches the car's speakers.
Speed and cameras
One set of rules on the phone, CarPlay and Android Auto (conformance/speed-alerts-v1.json). The panels are in
Speed panel and Camera alerts panel.
Speed tolerance
How far over the shown limit, in whole mph (or km/h), before the speed shows over the limit: the speed panel, the car screens' sign, the chime and the alerts to your app.
let presentation = try AtlasMapPresentation(navigationUI: true, speedTolerance: 2)val presentation = AtlasMapPresentation(navigationUI = true, speedTolerance = 2)import { atlasMapPresentation } from "@meridianatlas/react-native";
const presentation = atlasMapPresentation({ navigationUI: true, speedTolerance: 2 });final presentation = AtlasMapPresentation(navigationUI: true, speedTolerance: 2);Default: 0: any speed shown above the limit (31 in a 30). A whole number from 0 to 10. Kotlin, React Native and Flutter refuse anything else; Swift clamps it to 0 to 10 instead. The car screens take the presentation's unless you give them one (Car screen speed limit sign).
Camera speech
A voice attached to the map view or the car screen says each speed camera once ("Speed camera ahead, 30 limit"), whichever surface warns of it.
voice.speaksCameraAlerts = falsevoice.speaksCameraAlerts = falseawait voice.setCameraAlerts(false);await voice.setCameraAlerts(false);Default: on. Cameras are warned of only where it is lawful (the UK and Ireland). With the camera speech off, the voice still counts as speaking for the screen reader, which then doesn't read cameras either.
Over-limit chime
Two short soft tones as the driver goes over the limit, then not again until 30 seconds within it or a new limit. Played on your app's own audio session (iOS) or as navigation guidance (Android), without audio focus.
voice.chimesOverLimit = truevoice.chimesOverLimit = trueawait voice.setOverLimitChime(true);await voice.setOverLimitChime(true);Default: off. React Native's chime needs the device voice (new AtlasVoice(bridges.voice)), not your own
output.
Speed alerts to your app
Over the limit and back within it, and a camera warned of and passed, with what to say: for a panel or sound of your own. Each surface reports what it shows; with the phone's map and a car screen both up, listen to one.
map.onSpeedAlert = { alert in log(alert) }map.onSpeedAlert = { alert -> log(alert) }import { decodeSpeedAlert } from "@meridianatlas/react-native";
const view = <AtlasMapView configuration={atlas} onSpeedAlert={({ nativeEvent }) => console.log(decodeSpeedAlert(nativeEvent))} />;map.speedAlerts.listen((alert) => log(alert));Default: nothing to set: a map or car screen with an attached voice has already had each alert. With speech of
your own, say the camera's announcement and play your own sound for chime.
Car screen speed limit sign
The road sign in the corner of CarPlay's and Android Auto's map, with the speed beside it when over the limit and a lower limit ahead.
let carPlay = AtlasCarPlay(configuration: atlas, options: AtlasCarPlay.Options(showsSpeedLimit: false, speedTolerance: 2))val car = AtlasCar(atlas, showsSpeedLimit = false, speedTolerance = 2)await car.configure({ configuration: atlas, showsSpeedLimit: false, speedTolerance: 2 });await car.configure(configuration: atlas, showsSpeedLimit: false, speedTolerance: 2);Default: shown; the tolerance is the car screen map presentation's, else 0.
Car screen camera alerts
CarPlay's navigation alert and Android Auto's alert ("Speed camera ahead", "In 300 yd · 30 mph limit"), until the camera is passed; a toast before car API level 5.
Default: on, where warning of cameras is lawful. No switch on any SDK. The voice's camera speech has one (Camera speech).
Car screens
CarPlay (iOS) and Android Auto. The setup each needs is in CarPlay and Android Auto.
Car screen day and night
The car screen follows the car (usually its headlights), whatever the phone's map does. Hold it in day or night:
carPlay.appearance = .night // .auto gives it back to the carcar.appearance = AtlasMapAppearance.NIGHT // AUTO gives it back to the carawait car.setAppearance("night"); // "auto" gives it back to the carawait car.setAppearance(AtlasMapAppearance.night); // AtlasMapAppearance.auto gives it back to the carDefault: auto, the car's own (system follows the car too). The plugins keep it across configure.
Car screen map
The car screen's map presentation: style, 2D or 3D, buildings, quality, auto-recentre and speed tolerance, as on the phone.
let carPlay = AtlasCarPlay(configuration: atlas, options: AtlasCarPlay.Options(presentation: try AtlasMapPresentation(dimension: .twoDimensional)))val car = AtlasCar(atlas, presentation = AtlasMapPresentation(dimension = AtlasMapDimension.TWO_DIMENSIONAL))import { atlasMapPresentation } from "@meridianatlas/react-native";
await car.configure({ configuration: atlas, presentation: atlasMapPresentation({ dimension: "2d" }) });await car.configure(configuration: atlas, presentation: AtlasMapPresentation(dimension: AtlasMapDimension.twoDimensional));Default: the standard 3D map. Car screens draw their guidance in the car's own templates, not the phone's panels.
Dashboard and instrument cluster maps
CarPlay's dashboard and instrument cluster maps, smaller and on the car's own budget:
let small = try AtlasMapPresentation(dimension: .twoDimensional, quality: .balanced)
let carPlay = AtlasCarPlay(configuration: atlas, options: AtlasCarPlay.Options(dashboardPresentation: small, instrumentClusterPresentation: small))Default: 2D, flat buildings, low quality. Swift only: React Native and Flutter always use the default, and Android Auto's instrument cluster gets the manoeuvre and lanes as data, not a map.
Guidance card colour
The colour of CarPlay's guidance card. CarPlay checks its contrast and picks the text colour by it.
let carPlay = AtlasCarPlay(configuration: atlas, options: AtlasCarPlay.Options(guidanceBackgroundColor: UIColor(red: 0.04, green: 0.24, blue: 0.57, alpha: 1)))await car.configure({ configuration: atlas, guidanceColor: "#0B3D91" }); // CarPlay onlyawait car.configure(configuration: atlas, guidanceColor: '#0B3D91'); // CarPlay onlyDefault: Meridian navy (#1B3A6B). Not on Android Auto: its card is Meridian navy too, but Kotlin's
AtlasCar has no colour option, and the plugins ignore guidanceColor there.
Retry on the car screen
"Can't find a route" with Retry, when two reroutes in a row have failed:
carPlay.onRetryReroute = { navigation.retryReroute() }car.onRetryReroute = { navigation.retryReroute() }React Native and Flutter: the plugin's car screen takes Retry itself.
Default: Swift and Kotlin, no Retry button (the car screen says so, and the session keeps trying by itself); React Native and Flutter, always shown.
Car screen voice
The car screen shows guidance but says nothing unless it has a voice. CarPlay and Android Auto play your app's navigation speech through the car.
carPlay.voice = voicecar.voice = voice// Hand each update to your voice as on the phone; for the car screen's cameras and chime, its speed alerts:
car.onEvent((event) => { if (event.type === "speed_alert") void voice.handleSpeedAlert(event.alert); });// Hand each update to your voice as on the phone; for the car screen's cameras and chime, its speed alerts:
car.events.listen((event) {
if (event is AtlasCarSpeedAlert) voice.handleSpeedAlert(event.alert);
});Default: silent. Handing the same update to the voice yourself as well does no harm: an announcement is said once, and a camera the phone's map warned of too, once.
Android Auto hosts
Which Android Auto hosts may connect to your car app service. Debug builds accept any host; release builds the
hosts in the Car App Library's allow-list. With your own service (Kotlin), it is your createHostValidator; with
the plugins' service, name your own list in an array resource:
<!-- AndroidManifest.xml, inside the plugin's <service android:name="dev.meridianatlas.android.car.MeridianAtlasCarAppService"> -->
<meta-data android:name="dev.meridianatlas.car.hosts" android:resource="@array/your_car_hosts" />Default: any host in debug builds; the Car App Library's sample allow-list in release builds.
Developer and testing
Off by default, and meant to stay off in release builds: turn these on in debug builds and builds for app review.
Simulated drives
AtlasRouteSimulator drives your navigation session along a route without moving: 1 to 10 times real speed,
keeping to the speed limits and slowing for turns. While it runs the session takes only its fixes; after a
reroute, start it again along the new route.
#if DEBUG
let simulator = AtlasRouteSimulator(navigation: navigation, speedMultiplier: 4)
simulator.start(along: route)
#endifif (BuildConfig.DEBUG) AtlasRouteSimulator(navigation, speedMultiplier = 4.0).start(route)import { NativeModules } from "react-native";
import { AtlasRouteSimulator } from "@meridianatlas/react-native";
if (__DEV__) await new AtlasRouteSimulator(NativeModules.MeridianAtlas).start(route, { speedMultiplier: 4 });import 'package:flutter/foundation.dart';
if (kDebugMode) await AtlasRouteSimulator().start(route, speedMultiplier: 4);Default: off; 1× when on. The snapshots carry the car's own speed, so the speed panel reads as a speedometer would at 4×.
GPS noise in simulated drives
Fixes scattered about the car by about the accuracy you give (a clear sky: 5 m; among tall buildings: 15 to 30 m). The same seed repeats a run.
let simulator = AtlasRouteSimulator(navigation: navigation, speedMultiplier: 4, noise: AtlasRouteSimulator.Noise(accuracyMetres: 15, seed: 7))val simulator = AtlasRouteSimulator(navigation, speedMultiplier = 4.0, noise = AtlasSimulationNoise(accuracyM = 15.0, seed = 7))import { NativeModules } from "react-native";
import { AtlasRouteSimulator } from "@meridianatlas/react-native";
await new AtlasRouteSimulator(NativeModules.MeridianAtlas).start(route, { noise: { accuracyM: 15, seed: 7 } });await AtlasRouteSimulator().start(route, noiseAccuracyMetres: 15, noiseSeed: 7);Default: exact fixes; with noise and no accuracy, 8 m.
Replaying a recorded drive
Replays recorded fixes instead of a route: for example the fix events of a drive trace
(conformance/navigation-drive-traces-v1.json).
AtlasRouteSimulator(navigation: navigation).replay(try AtlasSimulatedLocation.trace(from: trace))AtlasRouteSimulator(navigation).replay(fixes)import { NativeModules } from "react-native";
import { AtlasRouteSimulator } from "@meridianatlas/react-native";
await new AtlasRouteSimulator(NativeModules.MeridianAtlas).replay(fixes, { speedMultiplier: 2 });await AtlasRouteSimulator().replay(fixes, speedMultiplier: 2);Simulate drive on the phone's map
A Simulate drive button beside the map buttons while guiding (Stop drive while it runs), with a dashed amber edge, for a developer at a desk or an app reviewer. It drives the route shown from where the car is.
#if DEBUG
map.simulator = AtlasRouteSimulator(navigation: navigation, speedMultiplier: 4)
#endifif (BuildConfig.DEBUG) map.simulator = AtlasRouteSimulator(navigation, speedMultiplier = 4.0)const view = <AtlasMapView configuration={atlas} simulationEnabled={__DEV__} />;import 'package:flutter/foundation.dart';
if (kDebugMode) await map.setSimulationEnabled(true);Default: off, and a release build must leave it off. One simulator can be the map's and the car screen's.
An older viewer, without the simulateDrive capability, shows no button.
Simulate on the car screen
A Simulate button on CarPlay or Android Auto while guiding; on Android Auto, its AUTO_DRIVE test command too.
#if DEBUG || ATLAS_REVIEW
carPlay.simulator = AtlasRouteSimulator(navigation: navigation, speedMultiplier: 4)
#endifif (BuildConfig.DEBUG || BuildConfig.ATLAS_REVIEW) car.simulator = AtlasRouteSimulator(navigation, speedMultiplier = 4.0)if (__DEV__) await car.setSimulationEnabled(true);import 'package:flutter/foundation.dart';
if (kDebugMode) await car.setSimulationEnabled(true);Default: off. Google Play's reviewers need it in the review build: see For Google Play's reviewers.
Plain HTTP to your computer
A service or viewer running on your computer, over plain HTTP, in a debug build:
let local = try AtlasConfiguration(apiKey: apiKey, baseURL: URL(string: "http://127.0.0.1:8080")!)val local = AtlasConfiguration(context, apiKey, "http://10.0.2.2:8080") // the emulator's hostimport { atlasConfiguration } from "@meridianatlas/react-native";
const local = atlasConfiguration({ apiKey, baseUrl: "http://10.0.2.2:8080" });final local = await AtlasConfiguration.forThisApp(apiKey: apiKey, baseUrl: 'http://127.0.0.1:8080');Default: HTTPS only. Plain HTTP is accepted only in a debug build (iOS DEBUG, a debuggable Android app,
React Native's __DEV__, Flutter's debug mode), and only to localhost, 127.0.0.1, [::1] or the Android
emulator's host, 10.0.2.2. On Android the app's network security config must also allow cleartext to that
host, or the request fails with network_error.
Your own HTTP
The service clients' networking, for tests or your own HTTP stack. Refuse redirects, so the key never follows one.
let routes = AtlasRoutes(configuration: atlas, session: session)val routes = AtlasRoutes(atlas, transport) // throw a SocketTimeoutException at the request's deadlineimport { AtlasRoutes } from "@meridianatlas/react-native";
const routes = new AtlasRoutes(atlas, transport); // (url, init) => Promise<Response>final routes = AtlasRoutes.fromConfiguration(atlas, transport: transport);Default: the platform's: URLSession.shared, HttpURLConnection, fetch, dart:io. A navigation session
made with a configuration takes the same (Swift session:, Kotlin httpTransport, React Native's third
argument, Flutter transport:).
Logs
No logging switch on any SDK. What the SDKs log by themselves:
- The map, once it is ready: "Atlas map viewer ready, build …, quality …" (iOS: subsystem
dev.meridianatlas, categorymap, at debug level; Android: tagAtlasMapView, debug). The build says which viewer you are on. - Android Auto: the car map's frame rate (tag
AtlasCar, info), and a warning when the host refuses a trip.
Everything else reaches your app through its callbacks: errors with a code and requestId, the map's
onError and onWarning, the session's effects and status.
Inspecting the map's web view
The map is a web view. On Android, a debug build can let Chrome's chrome://inspect see it (this turns
inspection on for every web view in your app):
android.webkit.WebView.setWebContentsDebuggingEnabled(BuildConfig.DEBUG)Default: off. Android only: the iOS map view doesn't make its web view inspectable, and has no switch for it.
Networking
Service address
The Atlas service the clients and the navigation session call.
let atlas = try AtlasConfiguration(apiKey: apiKey, baseURL: URL(string: "https://your-atlas-host")!)val atlas = AtlasConfiguration(context, apiKey, "https://your-atlas-host")import { atlasConfiguration } from "@meridianatlas/react-native";
const atlas = atlasConfiguration({ apiKey, baseUrl: "https://your-atlas-host" });final atlas = await AtlasConfiguration.forThisApp(apiKey: apiKey, baseUrl: 'https://your-atlas-host');Default: https://api.meridianatlas.dev (Swift AtlasConfiguration.defaultBaseURL; Kotlin, React Native
and the server client ATLAS_DEFAULT_BASE_URL; Flutter atlasDefaultBaseUrl). Use another only if Meridian
gave you one. HTTPS only (Plain HTTP to your computer).
Map viewer address
Where the map views and car screens load the Atlas viewer: for every map from the configuration, or for one map.
let atlas = try AtlasConfiguration(apiKey: apiKey, viewerURL: URL(string: "https://your-atlas-viewer")!)
let map = try AtlasMapView(configuration: atlas, viewerBaseURL: URL(string: "https://your-atlas-viewer")!)val atlas = AtlasConfiguration(context, apiKey, viewerUrl = "https://your-atlas-viewer")
val map = AtlasMapView(context, atlas, viewerBaseUrl = "https://your-atlas-viewer")import { atlasConfiguration } from "@meridianatlas/react-native";
const atlas = atlasConfiguration({ apiKey, viewerUrl: "https://your-atlas-viewer" });
const view = <AtlasMapView configuration={atlas} viewerBaseUrl="https://your-atlas-viewer" />;final atlas = await AtlasConfiguration.forThisApp(apiKey: apiKey, viewerUrl: 'https://your-atlas-viewer');Default: https://maps.meridianatlas.dev/v1 (Swift defaultViewerURL; ATLAS_DEFAULT_VIEWER_URL; Flutter
atlasDefaultViewerUrl). A map's own viewer address wins over the configuration's (Flutter:
AtlasMapView(viewerBaseUrl:)). The viewer gets the key in the page, never in its URL; a map made with only a
viewer address sends no key.
Request deadline
How long each request may take.
let atlas = try AtlasConfiguration(apiKey: apiKey, timeout: 60)val atlas = AtlasConfiguration(context, apiKey, timeoutMillis = 60_000)import { atlasConfiguration } from "@meridianatlas/react-native";
const atlas = atlasConfiguration({ apiKey, timeoutMs: 60_000 });
const route = await routes.route({ origin, destination }, { timeoutMs: 120_000 }); // one callfinal atlas = await AtlasConfiguration.forThisApp(apiKey: apiKey, timeout: const Duration(seconds: 60));
final route = await routes.route(origin: origin, destination: destination, timeout: const Duration(minutes: 2)); // one callDefault: 30 seconds; at most 5 minutes. Automatic reroutes have their own 15-second deadline. A deadline for one call is on React Native, Flutter and the server client only; Swift and Kotlin take the configuration's.
Your app's identity
Every request names your app (Atlas-App, and on Android Atlas-App-Cert), so an app key made for it works.
Server keys don't need it:
let server = try AtlasConfiguration(apiKey: apiKey, appIdentity: nil)val server = AtlasConfiguration(apiKey) // no Context: no appimport { atlasConfiguration } from "@meridianatlas/react-native";
const server = atlasConfiguration({ apiKey }); // no appIdentity: no appfinal server = AtlasConfiguration(apiKey: apiKey); // forThisApp sends the app; this doesn'tDefault: sent by Swift's configuration, Kotlin's Context constructor, React Native with
atlasAppIdentity(NativeModules.MeridianAtlas) and Flutter's forThisApp. An app key used without it fails
with app_not_allowed.
Idempotency keys
Calls billed per request send an Idempotency-Key, so a request that reached the service is charged once. Pass
your own (a UUID) to make your own retry of the same call count once:
let route = try await routes.route(from: origin, to: destination, idempotencyKey: UUID().uuidString)val route = routes.route(origin, destination, idempotencyKey = java.util.UUID.randomUUID().toString())const route = await routes.route({ origin, destination }, { idempotencyKey: crypto.randomUUID() });final route = await routes.route(origin: origin, destination: destination, idempotencyKey: 'a UUID you keep for the retry');Default: a new key for each call. The session's own reroutes and leg registrations reuse theirs when they try again.
What the SDK retries by itself
| What | Tries again | Switch |
|---|---|---|
| A service call (route, Places, matrix…) | Never: your app decides, with isRetryable (retryable) and retryAfterSeconds | Idempotency keys, Request deadline |
| Automatic reroutes | After 3 seconds, then 6, 12 and so on, up to a minute; offline, they wait | Retry a reroute now, Offline: reroutes wait |
| A request your app answers itself | Unanswered after 20 seconds counts as failed, and the session asks again | Automatic rerouting |
| Registering a navigation leg | After 1, 2, 4, 8 and 16 seconds, with the same key; then leg_registration_failed, and guidance carries on | Navigation legs |
| The map's scenery | Until no scenery came after every try: then scene_unavailable | None |
| The map's graphics context | Reloads the map, keeping what it was shown; after three, context_lost | None |
No automatic retry of service calls on any SDK. Errors says which codes can work later.
Offline routing
Routing on an offline package already on the device, with the same AtlasRoute as online:
import { AtlasOfflineRoutes } from "@meridianatlas/react-native";
const offline = new AtlasOfflineRoutes(bridges.offline);
await offline.initialize();
await offline.open({ routingPath: `${packageFolder}/routing.bin`, waysPath: `${packageFolder}/ways.bin`, releaseId: manifest.releaseId });final offline = AtlasOfflineRoutes();
await offline.initialize();
await offline.open(routingPath: '$packageFolder/routing.bin', waysPath: '$packageFolder/ways.bin', releaseId: manifest.releaseId);Default: online. Not in the Swift package yet. On Android (Kotlin) the offline engine installs a package
from a folder on the phone (OfflinePackageInstaller, AtlasOfflineWorkManager), with no one-line switch. No
SDK downloads packages over the network yet; React Native's and Flutter's download API is experimental and may
change. Offline routes have no lanes.
Server client
@meridianatlas/api, for your own servers, has networking options only:
import { AtlasClient } from "@meridianatlas/api";
const client = new AtlasClient({ apiKey, baseUrl, timeoutMs: 60_000, fetch });
const route = await client.route({ origin, destination, profile: "quickest" }, { timeoutMs: 120_000, idempotencyKey: crypto.randomUUID() });Default: https://api.meridianatlas.dev, 30 seconds, the runtime's fetch. It sends no app identity (server
keys) and retries nothing by itself.
Gaps between the SDKs
What some SDKs have and others don't, as of this release:
- Retry button: React Native and Flutter always show it on the map and car screen; there is no way to leave it out. Swift and Kotlin show it only once the app takes it.
- Manual rerouting on Kotlin: no
manualmode; a transport answers each reroute. - Following the network: only Kotlin has a helper (
AtlasNetworkCallback); the others callsetConnectivityfrom the app's own monitor. - Speed tolerance out of range: Swift clamps it to 0 to 10; Kotlin, React Native and Flutter refuse it.
- A deadline for one call: React Native, Flutter and the server client; Swift and Kotlin only per configuration.
- Android's speech engine: Kotlin only.
- Personal Voice: iOS only (Android has none).
- Car screen voice: Swift's and Kotlin's car screens take a voice; React Native's and Flutter's don't (your
phone's voice speaks, and the car screen's speed alerts go to
handleSpeedAlert). - Dashboard and instrument cluster maps: Swift only.
- Guidance card colour: CarPlay only (Swift, and React Native and Flutter on iOS); not on Android Auto.
- Tuning the session (dead reckoning and the rest): Kotlin's core only.
- Inspecting the map's web view: Android only.
- Offline routing: not in the Swift package.
- No switch on any SDK: the panels' text size, units, the car screens' camera alerts, logging.