Platforms and setup
Native platforms: ios, android.
- view opens directions to a point from the current location; it does not promise a marker-only map.
- Coordinate routes only; no text-only directions or travel-mode selector is exposed.
- arriveBy preserves the supplied instant and serializes UTC; device-local time is not inferred from destination.
Public actions
Citymapper.open
factory Citymapper.open({final bool fallbackToStore = false})
Launch with DeeplinkX.launchApp. Native platforms: ios, android. Action web fallback: available. Store-fallback flag: supported; opt in explicitly.
| Parameter | Type | Required | Default |
|---|---|---|---|
fallbackToStore | bool | No | false |
Citymapper.view
static CitymapperViewAction view({ required final Coordinate coordinate, final String? title, final bool fallbackToStore = false, })
Launch with DeeplinkX.launchAction. Native platforms: ios, android. Action web fallback: available. Store-fallback flag: supported; opt in explicitly.
| Parameter | Type | Required | Default |
|---|---|---|---|
coordinate | Coordinate | Yes | — |
title | String? | No | — |
fallbackToStore | bool | No | false |
Citymapper.directionsWithCoords
static CitymapperDirectionsWithCoordsAction directionsWithCoords({ required final Coordinate destination, final Coordinate? origin, final String? destinationTitle, final String? originTitle, final String? destinationAddress, final String? originAddress, final DateTime? arriveBy, final bool fallbackToStore = false, })
Launch with DeeplinkX.launchAction. Native platforms: ios, android. Action web fallback: available. Store-fallback flag: supported; opt in explicitly.
| Parameter | Type | Required | Default |
|---|---|---|---|
destination | Coordinate | Yes | — |
origin | Coordinate? | No | — |
destinationTitle | String? | No | — |
originTitle | String? | No | — |
destinationAddress | String? | No | — |
originAddress | String? | No | — |
arriveBy | DateTime? | No | — |
fallbackToStore | bool | No | false |
Provider setup and examples
DeeplinkX supports the Citymapper custom URI scheme on iOS and Android for opening the app and building route requests.
First-party References
- Citymapper directions-link guide
- Citymapper native/web links and arrival-time documentation
- Google Play listing
- Apple App Store listing
Citymapper opens coordinate-based directions from the current location or a supplied origin. Configure the package and scheme visibility below.
Available Actions
Launch Citymapper
final deeplinkX = DeeplinkX();
await deeplinkX.launchApp(Citymapper.open());
View Map
The verified Citymapper contract describes directions rather than a marker-only map. Citymapper.view implements the shared MapViewAction interface by opening directions to the coordinate from the user's current location. It does not promise a standalone marker view.
await deeplinkX.launchAction(
Citymapper.view(
coordinate: const Coordinate(latitude: 51.503399, longitude: -0.119519),
title: 'London Eye',
),
);
Directions With Coordinates
await deeplinkX.launchAction(
Citymapper.directionsWithCoords(
origin: const Coordinate(latitude: 51.500729, longitude: -0.124625),
destination: const Coordinate(latitude: 51.503399, longitude: -0.119519),
originTitle: 'Westminster',
destinationTitle: 'London Eye',
arriveBy: DateTime.utc(2026, 12, 2, 15, 30),
),
);
Citymapper route URLs are coordinate based, so DeeplinkX does not expose a text-only directions action for this app.
Omit origin to request directions from the current location. Without an origin, originTitle and originAddress are ignored and all start* parameters are omitted. Destination titles and addresses are optional display information, not substitutes for coordinates.
arriveBy is optional. DeeplinkX serializes it as UTC ISO-8601 with a Z suffix while preserving the instant. A local DateTime is interpreted in the caller device's local time zone—not inferred from the destination; use DateTime.utc or an offset-aware parsed value to specify an unambiguous instant. Both native and web links receive the same parameters. No travel-mode selector is exposed.
Platform Configuration
iOS
Add the Citymapper scheme to the LSApplicationQueriesSchemes array in ios/Runner/Info.plist:
<string>citymapper</string>
Android
Allow querying the package in android/app/src/main/AndroidManifest.xml:
<queries>
<package android:name="com.citymapper.app.release" />
</queries>
Navigation intents use action_view, package com.citymapper.app.release, and FLAG_ACTIVITY_NEW_TASK (0x10000000). The existing platform adapter may retry without package targeting when resolution fails; this provider does not change that adapter or guarantee strict targeting in every failure case.
URI Formats
- Directions destination:
citymapper://directions?endcoord={latitude},{longitude}&endname={title?} - Directions with origin:
citymapper://directions?startcoord={originLatitude},{originLongitude}&startname={originTitle?}&startaddress={originAddress?}&endcoord={destinationLatitude},{destinationLongitude}&endname={destinationTitle?}&endaddress={destinationAddress?}&arriveby={utcIso8601?} - Web fallback:
https://citymapper.com/directions?...
Optional parameters are omitted when null; supplied strings are URL-encoded using Dart's URI query construction. Empty strings remain supplied values.
Fallback Behavior
- DeeplinkX opens the native app when installed.
- If the app is missing and
fallbackToStoreistrue, we redirect to the appropriate store listing. - Otherwise the action falls back to
https://citymapper.com/directionswith the same route parameters. - Set
disableFallback: truewhen callinglaunchActionto skip both store and web fallbacks.
Fallback Support Matrix
| Action | Store Fallback | Web Fallback |
|---|---|---|
| Open app | ✔️ | ✔️ (website) |
| View map | ✔️ | ✔️ |
| Directions with coordinates | ✔️ | ✔️ |