# Yandex Maps

Canonical HTML: https://p-hatan.com/deeplink-x/apps/yandex-maps/

DeeplinkX 1.5.8.

## Platforms and setup

Native platforms: **ios, android**.



## Public actions

### YandexMaps.open


```dart
factory YandexMaps.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` |

[Exact source](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/lib/src/apps/downloadable_apps/yandex_maps.dart#L11)

### YandexMaps.openMap


```dart
static YandexMapsOpenMapAction openMap({ final Coordinate? center, final int? zoom, final YandexMapsViewport? viewport, final YandexMapsMapLayer layer = YandexMapsMapLayer.map, final bool showTraffic = false, 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 |
| --- | --- | --- | --- |
| `center` | `Coordinate?` | No | — |
| `zoom` | `int?` | No | — |
| `viewport` | `YandexMapsViewport?` | No | — |
| `layer` | `YandexMapsMapLayer` | No | `YandexMapsMapLayer.map` |
| `showTraffic` | `bool` | No | `false` |
| `fallbackToStore` | `bool` | No | `false` |

[Exact source](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/lib/src/apps/downloadable_apps/yandex_maps.dart#L14)

### YandexMaps.view


```dart
static YandexMapsViewAction view({ required final Coordinate coordinate, final int? zoom, final YandexMapsMapLayer layer = YandexMapsMapLayer.map, final bool showTraffic = false, 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 | — |
| `zoom` | `int?` | No | — |
| `layer` | `YandexMapsMapLayer` | No | `YandexMapsMapLayer.map` |
| `showTraffic` | `bool` | No | `false` |
| `fallbackToStore` | `bool` | No | `false` |

[Exact source](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/lib/src/apps/downloadable_apps/yandex_maps.dart#L32)

### YandexMaps.search


```dart
static YandexMapsSearchAction search({ required final String query, final Coordinate? center, final int? zoom, final YandexMapsViewport? viewport, final YandexMapsMapLayer layer = YandexMapsMapLayer.map, final bool showTraffic = false, 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 |
| --- | --- | --- | --- |
| `query` | `String` | Yes | — |
| `center` | `Coordinate?` | No | — |
| `zoom` | `int?` | No | — |
| `viewport` | `YandexMapsViewport?` | No | — |
| `layer` | `YandexMapsMapLayer` | No | `YandexMapsMapLayer.map` |
| `showTraffic` | `bool` | No | `false` |
| `fallbackToStore` | `bool` | No | `false` |

[Exact source](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/lib/src/apps/downloadable_apps/yandex_maps.dart#L48)

### YandexMaps.organization


```dart
static YandexMapsOrganizationAction organization({ required final String objectId, 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 |
| --- | --- | --- | --- |
| `objectId` | `String` | Yes | — |
| `fallbackToStore` | `bool` | No | `false` |

[Exact source](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/lib/src/apps/downloadable_apps/yandex_maps.dart#L68)

### YandexMaps.whatIsHere


```dart
static YandexMapsWhatIsHereAction whatIsHere({ required final Coordinate coordinate, final int zoom = 17, 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 | — |
| `zoom` | `int` | No | `17` |
| `fallbackToStore` | `bool` | No | `false` |

[Exact source](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/lib/src/apps/downloadable_apps/yandex_maps.dart#L78)

### YandexMaps.directionsWithCoords


```dart
static YandexMapsDirectionsWithCoordsAction directionsWithCoords({ required final Coordinate destination, final Coordinate? origin, final List<YandexMapsWaypoint> waypoints = const [], final YandexMapsTravelMode mode = YandexMapsTravelMode.driving, 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 | — |
| `waypoints` | `List<YandexMapsWaypoint>` | No | `const []` |
| `mode` | `YandexMapsTravelMode` | No | `YandexMapsTravelMode.driving` |
| `fallbackToStore` | `bool` | No | `false` |

[Exact source](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/lib/src/apps/downloadable_apps/yandex_maps.dart#L90)

### YandexMaps.panorama


```dart
static YandexMapsPanoramaAction panorama({ required final Coordinate coordinate, final YandexMapsPanoramaDirection? direction, final YandexMapsPanoramaSpan? span, 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 | — |
| `direction` | `YandexMapsPanoramaDirection?` | No | — |
| `span` | `YandexMapsPanoramaSpan?` | No | — |
| `fallbackToStore` | `bool` | No | `false` |

[Exact source](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/lib/src/apps/downloadable_apps/yandex_maps.dart#L106)


## Provider setup and examples
DeeplinkX supports the Yandex Maps `yandexmaps` URI scheme on iOS and Android.
It can open the app, show a map or placemark, search, open an organization
card, open the "What's here?" card, build coordinate routes, and launch
panoramas.

## References

- Yandex Maps Android launch URLs: <https://yandex.com/dev/yandex-apps-launch-maps/doc/en/concepts/yandexmaps-android-app>
- Yandex Maps iOS launch URLs: <https://yandex.com/dev/yandex-apps-launch-maps/doc/en/concepts/yandexmaps-ios-app>
- Yandex Maps web launch URLs: <https://yandex.com/dev/yandex-apps-launch-maps/doc/en/concepts/yandexmaps-web>

## Available Actions

### Launch Yandex Maps

```dart
final deeplinkX = DeeplinkX();
await deeplinkX.launchApp(YandexMaps.open());
```

### Open Map

```dart
await deeplinkX.launchAction(
  YandexMaps.openMap(
    center: const Coordinate(latitude: 55.753716, longitude: 37.619902),
    zoom: 11,
    showTraffic: true,
  ),
);
```

### View Map

```dart
await deeplinkX.launchAction(
  YandexMaps.view(
    coordinate: const Coordinate(latitude: 55.753716, longitude: 37.619902),
    zoom: 12,
  ),
);
```

### Search

```dart
await deeplinkX.launchAction(
  YandexMaps.search(
    query: 'cafe with wi-fi',
    center: const Coordinate(latitude: 55.753716, longitude: 37.619902),
    zoom: 16,
  ),
);
```

### Organization Card

```dart
await deeplinkX.launchAction(
  YandexMaps.organization(objectId: '1221676748'),
);
```

### What Is Here

```dart
await deeplinkX.launchAction(
  YandexMaps.whatIsHere(
    coordinate: const Coordinate(latitude: 55.753716, longitude: 37.619902),
    zoom: 17,
  ),
);
```

### Directions With Coordinates

```dart
await deeplinkX.launchAction(
  YandexMaps.directionsWithCoords(
    origin: const Coordinate(latitude: 55.753716, longitude: 37.619902),
    destination: const Coordinate(latitude: 55.76009, longitude: 37.648801),
    waypoints: const [
      YandexMapsWaypoint(
        coordinate: Coordinate(latitude: 55.745719, longitude: 37.604337),
      ),
    ],
    mode: YandexMapsTravelMode.transit,
  ),
);
```

### Panorama

```dart
await deeplinkX.launchAction(
  YandexMaps.panorama(
    coordinate: const Coordinate(latitude: 55.753716, longitude: 37.619902),
    direction: const YandexMapsPanoramaDirection(
      azimuth: 228.97,
      elevation: 6.060547,
    ),
    span: const YandexMapsPanoramaSpan(horizontal: 130, vertical: 71.919192),
  ),
);
```

## Platform Configuration

### iOS

Add the Yandex Maps scheme to the `LSApplicationQueriesSchemes` array in
`ios/Runner/Info.plist`:

```xml
<string>yandexmaps</string>
```

### Android

Allow querying the package in `android/app/src/main/AndroidManifest.xml`:

```xml
<queries>
  <package android:name="ru.yandex.yandexmaps" />
</queries>
```

## URI Formats

- Open map: `yandexmaps://maps.yandex.com/?ll={longitude},{latitude}&z={zoom}&l={layer}`
- View map: `yandexmaps://maps.yandex.ru/?pt={longitude},{latitude}&z={zoom}&l={layer}`
- Search: `yandexmaps://maps.yandex.com/?text={query}`
- Organization card: `yandexmaps://maps.yandex.com/?oid={objectId}`
- What is here: `yandexmaps://?whatshere[point]={longitude},{latitude}&whatshere[zoom]={zoom}`
- Directions: `yandexmaps://maps.yandex.com/?rtext={originLat},{originLng}~{destinationLat},{destinationLng}&rtt={mode}`
- Destination-only directions: `yandexmaps://maps.yandex.com/?rtext=~{destinationLat},{destinationLng}&rtt={mode}`
- Panorama: `yandexmaps://?panorama[point]={longitude},{latitude}&panorama[direction]={azimuth},{elevation}&panorama[span]={horizontal},{vertical}`

Routes use latitude-longitude pairs in `rtext`. Map display, search areas,
object lookup, and panorama points use longitude-latitude pairs, matching the
Yandex Maps launch URL docs.

Marker and route coordinate ordering, destination-only routes, and waypoint
ordering remain compatible with existing integrations. Destination-only routes
retain the leading `~` placeholder so Yandex uses the current location as the
origin. DeeplinkX also
validates provider ranges: zoom is 1 through 18, viewport deltas and panorama
spans must be positive and finite, organization IDs must contain only digits,
and panorama direction values must be finite and between 0 and 360.

## Fallback Behavior

1. DeeplinkX opens Yandex Maps when installed.
2. If the app is missing and `fallbackToStore` is `true`, it redirects to the
   matching App Store or Google Play listing.
3. Otherwise actions fall back to Yandex Maps on the web.
4. Set `disableFallback: true` when calling `launchAction` to skip both store
   and web fallbacks.

Organization cards use `https://yandex.com/maps/org/{objectId}` for their web
fallback. The native-only public map layer falls back to the standard map layer
on the web, while retaining the traffic layer when requested.

### Fallback Support Matrix

| Action                       | Store Fallback | Web Fallback |
| ---------------------------- | -------------- | ------------ |
| Open app                     | Yes            | Yes          |
| Open map                     | Yes            | Yes          |
| View map                     | Yes            | Yes          |
| Search                       | Yes            | Yes          |
| Organization card            | Yes            | Yes          |
| What is here                 | Yes            | Yes          |
| Directions with coordinates  | Yes            | Yes          |
| Panorama                     | Yes            | Yes          |

DeeplinkX does not expose a text-only `directions` action for Yandex Maps
because the Yandex Maps mobile launch URLs route by coordinates.

