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: atlas is your configuration, map your map view (Flutter: the AtlasMapController its onCreated gives you), navigation your navigation session, voice your AtlasVoice, route an AtlasRoute from AtlasRoutes, and carPlay or car your 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:
Swift
let presentation = try AtlasMapPresentation(navigationUI: true)
let map = try AtlasMapView(configuration: atlas, presentation: presentation)
Kotlin
val presentation = AtlasMapPresentation(navigationUI = true)
val map = AtlasMapView(context, atlas, presentation = presentation.toViewerParameters())
TypeScript
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 })} />;
Dart
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

SwitchDefaultMissing on
Built-in guidance panelsOff
Choosing panelsAll of them
Banner, lanes, camera alerts, speed, trip progressOn (with the panels)
Recentre, Route overview, Mute, Arrival cardOn (with the panels)
EndShown once your app takes it
RetryShown once your app takes it (Swift, Kotlin); always (React Native, Flutter)Can't be turned off in React Native and Flutter
Day and nightauto
Map stylestandard
2D or 3D3D
BuildingsExtruded (flat in 2D and Neon Coast), opaque
Qualityauto
Auto-recentreOff
Overview and recentre from your own controls
Your views over the mapNo insets
Large textFollows the system, up to 1.5×No switch on any SDK
UnitsMiles, yards and mph on the phoneNo switch on any SDK
Automatic reroutingOn with a configurationNo manual mode on Kotlin (a transport answers)
Your own routing for reroutesOff
Retry a reroute now
Offline: reroutes waitOnlineA helper on Kotlin only (AtlasNetworkCallback)
Navigation legsOn with a configuration
Traffic-aware routesNot asked for
Side of the road on arrivalEither side
Quickest or shortestQuickest
Planned departureNow
Starting the way the car facesAny way (reroutes: the car's)
Who runs GPSYour app (Swift, Kotlin); the package (React Native, Flutter)
Guidance with the screen offOff until your app is set up for it
The Navigating notification"Navigating", the SDK's arrowAndroid only
Dead reckoning through tunnelsOn, 5 minutes or 3.5 kmTunable on Kotlin's core only
Spoken guidanceOff (opt-in)
Choosing a voiceThe best installed British voice
Muting the voiceNot muted
SSMLOn
Your own speechThe device's speech
Android's speech engineThe user's defaultKotlin only
Personal VoiceNot askediOS only
Your audio while Atlas speaksUntouched
Speed tolerance0
Camera speechOn
Over-limit chimeOff
Speed alerts to your app
Car screen speed limit signOn
Car screen camera alertsOn where lawfulNo switch on any SDK
Car screen day and nightauto (the car's)
Car screen mapThe standard 3D map
Dashboard and instrument cluster maps2D, flat, low qualitySwift only
Guidance card colourMeridian navyAndroid Auto
Retry on the car screenShown once your app takes it (Swift, Kotlin); always (React Native, Flutter)
Car screen voiceSilentNo car screen voice on React Native and Flutter (your phone's voice speaks)
Android Auto hostsAny host in debug builds; the Car App Library's list in release
Simulated drivesOff
GPS noise in simulated drivesExact fixes
Replaying a recorded drive
Simulate drive on the phone's mapOff
Simulate on the car screenOff
Plain HTTP to your computerHTTPS only
Your own HTTPThe platform's
LogsA few lines, no switchNo switch on any SDK
Inspecting the map's web viewOffAndroid only
Service addresshttps://api.meridianatlas.dev
Map viewer addresshttps://maps.meridianatlas.dev/v1
Request deadline30 secondsPer call on React Native, Flutter and servers only
Your app's identitySent
Idempotency keysOne per billed call
What the SDK retries by itselfNo automatic retry of service calls on any SDK
Offline routingOnlineNot 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.

Swift
let presentation = try AtlasMapPresentation(navigationUI: true)
Kotlin
val presentation = AtlasMapPresentation(navigationUI = true)
TypeScript
import { atlasMapPresentation } from "@meridianatlas/react-native";

const presentation = atlasMapPresentation({ navigationUI: true });
Dart
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:

PanelSwiftKotlinReact NativeFlutter
Banner.bannerBANNER"banner"banner
Lanes.lanesLANES"lanes"lanes
Camera alerts.cameraAlertsCAMERA_ALERTS"camera_alerts"cameraAlerts
Speed.speedSPEED"speed"speed
Trip progress.tripProgressTRIP_PROGRESS"trip_progress"tripProgress
Recentre.recentreRECENTRE"recentre"recentre
Mute.muteMUTE"mute"mute
Arrival card.arrivalARRIVAL"arrival"arrival
Route overview.overviewOVERVIEW"overview"overview
End.endEND"end"end

Default: all of them. For example, everything but trip progress:

Swift
let presentation = try AtlasMapPresentation(navigationUI: true, navigationPanels: AtlasNavigationPanels.all.subtracting(.tripProgress))
Kotlin
val presentation = AtlasMapPresentation(navigationUI = true,
    navigationPanels = AtlasNavigationPanel.entries.toSet() - AtlasNavigationPanel.TRIP_PROGRESS)
TypeScript
import { ATLAS_NAVIGATION_PANELS, atlasMapPresentation } from "@meridianatlas/react-native";

const presentation = atlasMapPresentation({
  navigationUI: true,
  navigationPanels: ATLAS_NAVIGATION_PANELS.filter((panel) => panel !== "trip_progress"),
});
Dart
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.

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:

Swift
map.show(route, destination: AtlasMapPlace(name: "Interact CC Wigan", address: "Wallgate, Wigan WN1 1BA"))
Kotlin
map.showRoute(route, destination = AtlasMapPlace("Interact CC Wigan", "Wallgate, Wigan WN1 1BA"))
TypeScript
import { atlasMapRoute } from "@meridianatlas/react-native";

const view = <AtlasMapView configuration={atlas} route={atlasMapRoute(route, { destination: { name: "Interact CC Wigan" } })} />;
Dart
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:

Swift
map.voice = voice
Kotlin
map.voice = voice
TypeScript
import { 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 />;
Dart
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:

Swift
map.onArrivalAction = { action in
    if case .end = action { _ = try? navigation.stop() }
}
Kotlin
map.onArrivalAction = { action -> if (action is AtlasArrivalAction.End) navigation.stop() }
TypeScript
const view = <AtlasMapView configuration={atlas}
  onArrivalAction={({ nativeEvent }) => { if (nativeEvent.action === "end") void navigation.stop(); }} />;
Dart
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:

Swift
map.onEndGuidance = { _ = try? navigation.stop() }
Kotlin
map.onEndGuidance = { navigation.stop() }
TypeScript
const view = <AtlasMapView configuration={atlas} onEndGuidance={() => void navigation.stop()} />;
Dart
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:

Swift
map.onRetryReroute = { navigation.retryReroute() }
Kotlin
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:

ValueNight
autoWhen the phone is in dark mode, and from civil dusk to civil dawn where the car is, whatever the phone is in
systemWhen the phone is in dark mode (or your app's own override of it)
day, nightNever, 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.

Swift
map.appearance = .night   // .auto turns automatic day and night on again
Kotlin
map.appearance = AtlasMapAppearance.NIGHT   // AUTO turns automatic day and night on again
TypeScript
import { 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" });
Dart
await map.setAppearance(AtlasMapAppearance.night); // AtlasMapAppearance.auto turns automatic on again

Default: 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).

Swift
let presentation = try AtlasMapPresentation(style: .neonCoast)
Kotlin
val presentation = AtlasMapPresentation(style = AtlasMapStyle.NEON_COAST)
TypeScript
import { atlasMapPresentation } from "@meridianatlas/react-native";

const presentation = atlasMapPresentation({ style: "neon-coast" });
Dart
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.

Swift
let presentation = try AtlasMapPresentation(dimension: .twoDimensional)
Kotlin
val presentation = AtlasMapPresentation(dimension = AtlasMapDimension.TWO_DIMENSIONAL)
TypeScript
import { atlasMapPresentation } from "@meridianatlas/react-native";

const presentation = atlasMapPresentation({ dimension: "2d" });
Dart
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).

Swift
let presentation = try AtlasMapPresentation(buildingDisplay: .footprints, buildingOpacity: 0.6)
Kotlin
val presentation = AtlasMapPresentation(buildingDisplay = AtlasBuildingDisplay.FOOTPRINTS, buildingOpacity = 0.6)
TypeScript
import { atlasMapPresentation } from "@meridianatlas/react-native";

const presentation = atlasMapPresentation({ buildingDisplay: "footprints", buildingOpacity: 0.6 });
Dart
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.

Swift
let presentation = try AtlasMapPresentation(quality: .balanced)
Kotlin
val presentation = AtlasMapPresentation(quality = AtlasMapQuality.BALANCED)
TypeScript
import { atlasMapPresentation } from "@meridianatlas/react-native";

const presentation = atlasMapPresentation({ quality: "balanced" });
Dart
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.

Swift
let presentation = try AtlasMapPresentation(navigationUI: true, autoRecentreAfter: 10)
Kotlin
val presentation = AtlasMapPresentation(navigationUI = true, autoRecentreAfterSeconds = 10.0)
TypeScript
import { atlasMapPresentation } from "@meridianatlas/react-native";

const presentation = atlasMapPresentation({ navigationUI: true, autoRecentreAfterSeconds: 10 });
Dart
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).

Swift
map.showOverview()
map.recentre()
Kotlin
map.showOverview()
map.recentre()
TypeScript
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 car
Dart
await 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.

Swift
map.setInsets(UIEdgeInsets(top: 0, left: 0, bottom: 120, right: 0))   // points
Kotlin
map.setInsets(0.0, 0.0, 120.0, 0.0)   // dp: top, left, bottom, right
TypeScript
const view = <AtlasMapView configuration={atlas} insets={{ bottom: 120 }} />;
Dart
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:

Swift
let manual = AtlasNavigation(configuration: atlas, rerouting: .manual)
TypeScript
import { AtlasNavigation } from "@meridianatlas/react-native";

const manual = new AtlasNavigation(bridges.navigation, atlas, undefined, { rerouting: "manual" });
Dart
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.

Swift
let custom = AtlasNavigation(configuration: atlas, rerouting: .custom { effect in
    try await yourRouter.route(from: effect.origin!, to: effect.destination!, heading: effect.headingDegrees)
})
Kotlin
val custom = AtlasNavigation(atlas, transport = transport, listener = listener)
TypeScript
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),
});
Dart
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):

Swift
navigation.retryReroute()
Kotlin
navigation.retryReroute()
TypeScript
await navigation.retryReroute();
Dart
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.

Swift
navigation.setConnectivity(false)   // true when the connection is back
Kotlin
import android.net.ConnectivityManager

// AtlasNetworkCallback calls setConnectivity for you, from Android's own network callbacks.
context.getSystemService(ConnectivityManager::class.java)?.registerDefaultNetworkCallback(AtlasNetworkCallback(navigation))
TypeScript
await navigation.setConnectivity(false); // true when the connection is back
Dart
await navigation.setConnectivity(false); // true when the connection is back

Default: 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.

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:

Swift
let navigation = AtlasNavigation(rerouting: .manual, onUpdate: { update in /* ... */ })
Kotlin
val navigation = AtlasNavigation(transport, listener)
TypeScript
import { AtlasNavigation } from "@meridianatlas/react-native";

const navigation = new AtlasNavigation(bridges.navigation);
Dart
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.

Swift
let route = try await routes.route(from: origin, to: destination, trafficAware: true)
Kotlin
val route = routes.route(origin, destination, trafficAware = true)   // off the main thread
TypeScript
const route = await routes.route({ origin, destination, traffic: "aware" });
Dart
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.

Swift
let route = try await routes.route(from: origin, to: destination, approach: .curb)
Kotlin
val route = routes.route(origin, destination, approach = AtlasApproach.CURB)
TypeScript
const route = await routes.route({ origin, destination, approach: "curb" });
Dart
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

Swift
let route = try await routes.route(from: origin, to: destination, profile: .shortest)
Kotlin
val route = routes.route(origin, destination, profile = AtlasRouteProfile.SHORTEST)
TypeScript
const route = await routes.route({ origin, destination, profile: "shortest" });
Dart
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.

Swift
let route = try await routes.route(from: origin, to: destination, departureTime: Date(timeIntervalSinceNow: 3600))
Kotlin
val route = routes.route(origin, destination, departureTime = java.time.Instant.now().plusSeconds(3600))
TypeScript
const route = await routes.route({ origin, destination, departureTime: "2026-12-03T08:00:00Z" });
Dart
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.

Swift
let route = try await routes.route(from: origin, to: destination, heading: 90)
Kotlin
val route = routes.route(origin, destination, heading = 90.0)
TypeScript
const route = await routes.route({ origin, destination, heading: 90 });
Dart
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

SDKWho 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, FlutterThe package, while a session is active (high accuracy; on Android a foreground service keeps it going with the screen off)
Swift
manager.desiredAccuracy = kCLLocationAccuracyBestForNavigation
manager.activityType = .automotiveNavigation
manager.pausesLocationUpdatesAutomatically = false   // else iOS pauses fixes in a long queue
manager.showsBackgroundLocationIndicator = true
manager.startUpdatingLocation()
Kotlin
val gps = ForegroundLocationSource(context)
gps.checkAvailable()                                // location_permission_required or location_accuracy_reduced
gps.start { sample -> navigation.ingest(sample) }   // and gps.stop() when guidance ends

React 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 location entry in UIBackgroundModes (Signing & Capabilities > Background Modes > Location updates). With the Swift package, also manager.allowsBackgroundLocationUpdates = true, which traps without the background mode. To speak with the screen locked, the audio background mode too.
  • Android: ForegroundLocationSource (Kotlin) and the plugins run a location foreground service with a "Navigating" notification. Ask for POST_NOTIFICATIONS on 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):

XML
<!-- 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:

Kotlin
// 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.

Swift
let voice = AtlasVoice()
let navigation = AtlasNavigation(configuration: atlas, onUpdate: { update in voice.handle(update) })
Kotlin
val voice = AtlasVoice(context)   // in AtlasNavigationListener.onUpdate: voice.handle(update)
TypeScript
import { AtlasVoice } from "@meridianatlas/react-native";

const voice = new AtlasVoice(bridges.voice);
navigation.subscribe((update) => { void voice.handle(update); });
Dart
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:

Swift
voice.selectedVoiceId = voice.voices(AtlasVoiceFilter(locale: "en-GB", minimumQuality: "enhanced")).first?.id
Kotlin
voice.selectedVoiceId = voice.voices(AtlasVoiceFilter(locale = "en-GB", minimumQuality = "enhanced")).firstOrNull()?.id
TypeScript
const voices = await voice.voices({ locale: "en-GB", minimumQuality: "enhanced" });
await voice.selectVoice(voices[0]?.id ?? null);
Dart
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

Swift
voice.isMuted = true
Kotlin
voice.isMuted = true
TypeScript
await voice.setMuted(true);
Dart
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.

Swift
voice.usesSSML = false   // the plain text is said
Kotlin
voice.usesSsml = false   // your own output gets the plain text only
TypeScript
await voice.setSsml(false);
Dart
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.

Swift
let voice = AtlasVoice(output: output)   // output: speak(text:ssml:completion:) and stop()
Kotlin
val voice = AtlasVoice(output)   // output: speak(text, ssml, completion) and stop()
TypeScript
import { AtlasVoice } from "@meridianatlas/react-native";

const voice = new AtlasVoice({ speak: async (text, ssml) => { /* say it; resolve when said */ } });
Dart
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.

Kotlin
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.

Swift
voice.requestPersonalVoiceAuthorization { status in log(status) }
TypeScript
await voice.requestPersonalVoice();
Dart
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:

Swift
voice.onWillSpeak = { _ in /* duck your own audio */ }
voice.onDidSpeak = { _, _ in if !voice.isSpeaking { /* restore it */ } }
Kotlin
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 */ }
    }
}
TypeScript
voice.subscribe((event) => {
  // will_speak: duck your own audio; did_speak with speaking false: restore it
});
Dart
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.

Swift
let presentation = try AtlasMapPresentation(navigationUI: true, speedTolerance: 2)
Kotlin
val presentation = AtlasMapPresentation(navigationUI = true, speedTolerance = 2)
TypeScript
import { atlasMapPresentation } from "@meridianatlas/react-native";

const presentation = atlasMapPresentation({ navigationUI: true, speedTolerance: 2 });
Dart
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.

Swift
voice.speaksCameraAlerts = false
Kotlin
voice.speaksCameraAlerts = false
TypeScript
await voice.setCameraAlerts(false);
Dart
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.

Swift
voice.chimesOverLimit = true
Kotlin
voice.chimesOverLimit = true
TypeScript
await voice.setOverLimitChime(true);
Dart
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.

Swift
map.onSpeedAlert = { alert in log(alert) }
Kotlin
map.onSpeedAlert = { alert -> log(alert) }
TypeScript
import { decodeSpeedAlert } from "@meridianatlas/react-native";

const view = <AtlasMapView configuration={atlas} onSpeedAlert={({ nativeEvent }) => console.log(decodeSpeedAlert(nativeEvent))} />;
Dart
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.

Swift
let carPlay = AtlasCarPlay(configuration: atlas, options: AtlasCarPlay.Options(showsSpeedLimit: false, speedTolerance: 2))
Kotlin
val car = AtlasCar(atlas, showsSpeedLimit = false, speedTolerance = 2)
TypeScript
await car.configure({ configuration: atlas, showsSpeedLimit: false, speedTolerance: 2 });
Dart
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:

Swift
carPlay.appearance = .night   // .auto gives it back to the car
Kotlin
car.appearance = AtlasMapAppearance.NIGHT   // AUTO gives it back to the car
TypeScript
await car.setAppearance("night"); // "auto" gives it back to the car
Dart
await car.setAppearance(AtlasMapAppearance.night); // AtlasMapAppearance.auto gives it back to the car

Default: 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.

Swift
let carPlay = AtlasCarPlay(configuration: atlas, options: AtlasCarPlay.Options(presentation: try AtlasMapPresentation(dimension: .twoDimensional)))
Kotlin
val car = AtlasCar(atlas, presentation = AtlasMapPresentation(dimension = AtlasMapDimension.TWO_DIMENSIONAL))
TypeScript
import { atlasMapPresentation } from "@meridianatlas/react-native";

await car.configure({ configuration: atlas, presentation: atlasMapPresentation({ dimension: "2d" }) });
Dart
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:

Swift
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.

Swift
let carPlay = AtlasCarPlay(configuration: atlas, options: AtlasCarPlay.Options(guidanceBackgroundColor: UIColor(red: 0.04, green: 0.24, blue: 0.57, alpha: 1)))
TypeScript
await car.configure({ configuration: atlas, guidanceColor: "#0B3D91" }); // CarPlay only
Dart
await car.configure(configuration: atlas, guidanceColor: '#0B3D91'); // CarPlay only

Default: 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:

Swift
carPlay.onRetryReroute = { navigation.retryReroute() }
Kotlin
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.

Swift
carPlay.voice = voice
Kotlin
car.voice = voice
TypeScript
// 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); });
Dart
// 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:

XML
<!-- 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.

Swift
#if DEBUG
let simulator = AtlasRouteSimulator(navigation: navigation, speedMultiplier: 4)
simulator.start(along: route)
#endif
Kotlin
if (BuildConfig.DEBUG) AtlasRouteSimulator(navigation, speedMultiplier = 4.0).start(route)
TypeScript
import { NativeModules } from "react-native";
import { AtlasRouteSimulator } from "@meridianatlas/react-native";

if (__DEV__) await new AtlasRouteSimulator(NativeModules.MeridianAtlas).start(route, { speedMultiplier: 4 });
Dart
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.

Swift
let simulator = AtlasRouteSimulator(navigation: navigation, speedMultiplier: 4, noise: AtlasRouteSimulator.Noise(accuracyMetres: 15, seed: 7))
Kotlin
val simulator = AtlasRouteSimulator(navigation, speedMultiplier = 4.0, noise = AtlasSimulationNoise(accuracyM = 15.0, seed = 7))
TypeScript
import { NativeModules } from "react-native";
import { AtlasRouteSimulator } from "@meridianatlas/react-native";

await new AtlasRouteSimulator(NativeModules.MeridianAtlas).start(route, { noise: { accuracyM: 15, seed: 7 } });
Dart
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).

Swift
AtlasRouteSimulator(navigation: navigation).replay(try AtlasSimulatedLocation.trace(from: trace))
Kotlin
AtlasRouteSimulator(navigation).replay(fixes)
TypeScript
import { NativeModules } from "react-native";
import { AtlasRouteSimulator } from "@meridianatlas/react-native";

await new AtlasRouteSimulator(NativeModules.MeridianAtlas).replay(fixes, { speedMultiplier: 2 });
Dart
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.

Swift
#if DEBUG
map.simulator = AtlasRouteSimulator(navigation: navigation, speedMultiplier: 4)
#endif
Kotlin
if (BuildConfig.DEBUG) map.simulator = AtlasRouteSimulator(navigation, speedMultiplier = 4.0)
TypeScript
const view = <AtlasMapView configuration={atlas} simulationEnabled={__DEV__} />;
Dart
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.

Swift
#if DEBUG || ATLAS_REVIEW
carPlay.simulator = AtlasRouteSimulator(navigation: navigation, speedMultiplier: 4)
#endif
Kotlin
if (BuildConfig.DEBUG || BuildConfig.ATLAS_REVIEW) car.simulator = AtlasRouteSimulator(navigation, speedMultiplier = 4.0)
TypeScript
if (__DEV__) await car.setSimulationEnabled(true);
Dart
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:

Swift
let local = try AtlasConfiguration(apiKey: apiKey, baseURL: URL(string: "http://127.0.0.1:8080")!)
Kotlin
val local = AtlasConfiguration(context, apiKey, "http://10.0.2.2:8080")   // the emulator's host
TypeScript
import { atlasConfiguration } from "@meridianatlas/react-native";

const local = atlasConfiguration({ apiKey, baseUrl: "http://10.0.2.2:8080" });
Dart
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.

Swift
let routes = AtlasRoutes(configuration: atlas, session: session)
Kotlin
val routes = AtlasRoutes(atlas, transport)   // throw a SocketTimeoutException at the request's deadline
TypeScript
import { AtlasRoutes } from "@meridianatlas/react-native";

const routes = new AtlasRoutes(atlas, transport); // (url, init) => Promise<Response>
Dart
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, category map, at debug level; Android: tag AtlasMapView, 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):

Kotlin
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.

Swift
let atlas = try AtlasConfiguration(apiKey: apiKey, baseURL: URL(string: "https://your-atlas-host")!)
Kotlin
val atlas = AtlasConfiguration(context, apiKey, "https://your-atlas-host")
TypeScript
import { atlasConfiguration } from "@meridianatlas/react-native";

const atlas = atlasConfiguration({ apiKey, baseUrl: "https://your-atlas-host" });
Dart
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.

Swift
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")!)
Kotlin
val atlas = AtlasConfiguration(context, apiKey, viewerUrl = "https://your-atlas-viewer")
val map = AtlasMapView(context, atlas, viewerBaseUrl = "https://your-atlas-viewer")
TypeScript
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" />;
Dart
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.

Swift
let atlas = try AtlasConfiguration(apiKey: apiKey, timeout: 60)
Kotlin
val atlas = AtlasConfiguration(context, apiKey, timeoutMillis = 60_000)
TypeScript
import { atlasConfiguration } from "@meridianatlas/react-native";

const atlas = atlasConfiguration({ apiKey, timeoutMs: 60_000 });
const route = await routes.route({ origin, destination }, { timeoutMs: 120_000 }); // one call
Dart
final 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 call

Default: 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:

Swift
let server = try AtlasConfiguration(apiKey: apiKey, appIdentity: nil)
Kotlin
val server = AtlasConfiguration(apiKey)   // no Context: no app
TypeScript
import { atlasConfiguration } from "@meridianatlas/react-native";

const server = atlasConfiguration({ apiKey }); // no appIdentity: no app
Dart
final server = AtlasConfiguration(apiKey: apiKey); // forThisApp sends the app; this doesn't

Default: 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:

Swift
let route = try await routes.route(from: origin, to: destination, idempotencyKey: UUID().uuidString)
Kotlin
val route = routes.route(origin, destination, idempotencyKey = java.util.UUID.randomUUID().toString())
TypeScript
const route = await routes.route({ origin, destination }, { idempotencyKey: crypto.randomUUID() });
Dart
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

WhatTries againSwitch
A service call (route, Places, matrix…)Never: your app decides, with isRetryable (retryable) and retryAfterSecondsIdempotency keys, Request deadline
Automatic reroutesAfter 3 seconds, then 6, 12 and so on, up to a minute; offline, they waitRetry a reroute now, Offline: reroutes wait
A request your app answers itselfUnanswered after 20 seconds counts as failed, and the session asks againAutomatic rerouting
Registering a navigation legAfter 1, 2, 4, 8 and 16 seconds, with the same key; then leg_registration_failed, and guidance carries onNavigation legs
The map's sceneryUntil no scenery came after every try: then scene_unavailableNone
The map's graphics contextReloads the map, keeping what it was shown; after three, context_lostNone

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:

TypeScript
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 });
Dart
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:

TypeScript
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 manual mode; a transport answers each reroute.
  • Following the network: only Kotlin has a helper (AtlasNetworkCallback); the others call setConnectivity from 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.
Proposal · draft