Launch Yandex Maps iOS app

This section applies to the Yandex Maps mobile app, version 7.1.1 or higher.

You can launch mobile Yandex Maps for iOS from an Objective-C app or browser page. Use the yandexmaps URL scheme to launch the app. Yandex Maps can run the following actions on launch:

Open map

You can display the map using the following URL format:

yandexmaps://maps.yandex.com/?{parameters}

Parameter

Data type

Description

ll

float,float

Map center coordinates (longitude, latitude).

z

int

Map zoom. An integer from 1 to 18, where 1 is the least detailed map zoom (whole world), and 18 is the highest zoom possible.

spn

float,float

Viewport. Longitudinal and latitudinal size of the viewport in degrees, comma-separated. For example, to set a viewport of 10.5 degrees, specify: spn=10.5, 10.5.

The viewport center is set using the ll parameter (map center).

If z (zoom) is already set, then spn is ignored.

l

string

Map type and traffic information.

Type of map: map (Map), sat (Satellite), skl (Hybrid), pmap (Public Map).

Show road traffic: trf ("traffic" layer). You can enable the traffic layer only, or combine it with some map type. In this case, the parameter values are comma-separated. For example: l=map,trf.

Note

If the map parameters are not passed in the URL, the previous user session parameters are used.

URL example:

yandexmaps://maps.yandex.ru/?ll=30.310182,59.951059&z=12&l=map

HTML link example:

<a href="yandexmaps://maps.yandex.com/?ll=30.310182,59.951059&z12&l=map">Map of Saint Petersburg</a>

Sample Objective-C call:

[[UIApplication sharedApplication] openURL:
 [NSURL URLWithString:@"yandexmaps://maps.yandex.ru/?ll=30.310182,59.951059&z=12&l=map"]];

Add placemark

You can display the map with a placemark using the following URL format:

yandexmaps://maps.yandex.com/?{parameters}

Parameter

Data type

Description

pt

float,float

Placemark coordinates (longitude, latitude).

If the ll parameter (map center) is not specified, the map is centered at the point specified in pt.

URL example:

yandexmaps://maps.yandex.ru/?pt=30.335429,59.944869&z=18&l=map

HTML link example:

<a href="yandexmaps://maps.yandex.com/?pt=30.335429, 59.944869&z=18&l=map" >Summer Garden</a>

Sample Objective-C call:

[[UIApplication sharedApplication] openURL:
 [NSURL URLWithString:@"yandexmaps://maps.yandex.ru/?pt=30.335429,59.944869&z=18&l=map"]];

To show objects in a specified area of the map, use the following URL format:

yandexmaps://maps.yandex.com/?{parameters}

Parameter

Data type

Description

text

string

Text of the search query.

To set the search area, specify the map center ll and the zoom level or viewport. If the search area is not specified, the parameters of the previous user session are used.

URL example:

yandexmaps://maps.yandex.ru/?ll=30.310182,59.951059&z=16&text=кафе%20с%20wi-fi

HTML link example:

<a href="yandexmaps://maps.yandex.com/?ll=30.310182,59.951059&z=16&text=cafe%20with%20wifi">Show cafes with Wi-Fi</a>

Example (map center and viewport of 0.05×0.05 degrees are specified):

NSURL *url = [NSURL URLWithString:[@"yandexmaps://maps.yandex.ru/?ll30.310182,59.951059&spn=0.05,0.05&text=кафе с wi-fi" stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
[[UIApplication sharedApplication] openURL:url];

Open organization card

You can display the organization card using the following URL format:

yandexmaps://maps.yandex.com/?{parameters}

Parameter

Data type

Description

oid

int

Unique organization ID in the Yandex Maps app.

Tip

To find out the organization ID, open the organization card in the mobile app and click upon in the upper right corner of the screen. The resulting link will contain the ID.

URL example:

yandexmaps://maps.yandex.ru/?oid=1184371713

HTML link example:

<a href="yandexmaps://maps.yandex.com/?oid=1184371713">Museum of Soviet gaming machines</a>

Sample Objective-C call:

[[UIApplication sharedApplication] openURL:
 [NSURL URLWithString:@"yandexmaps://maps.yandex.ru/?oid=1184371713"]];

Show What's here?"

To open a card for an object located at a specified point, use the following URL format:

yandexmaps://?{parameters}

Parameter

Data type

Description

whatshere[point]

float,float

Object coordinates.

An object can be, for example, a street, public transport stop, or organization.

whatshere[zoom]

float,float

Map zoom. An integer from 1 to 18, where 1 is the least detailed map zoom (whole world), and 18 is the highest zoom possible.

URL example:

yandexmaps://?whatshere[point]=37.444075,55.776788&whatshere[zoom]=17

HTML link example:

<a href="yandexmaps://?whatshere[point]=37.444075,55.776788&whatshere[zoom]=17">Bridge</a>

Sample Objective-C call:

[[UIApplication sharedApplication] openURL:
 [NSURL URLWithString:@"yandexmaps://?whatshere[point]=37.444075,55.776788&whatshere[zoom]=17"]];

Plot route

To show a route on the map, enter the start and end points of the route in the URL. The route is always plotted based on traffic.

yandexmaps://maps.yandex.com/?{parameters}

Parameter

Data type

Description

rtext

float,float~float,float

Coordinates of the start and end points of the route (latitude, longitude).

rtt

string

Route type: auto (driving route), mt (public transport route), pd (pedestrian route.)

For example, if rtt=mt, then a public transport route is built.

Note

If the route type is not set, a driving route is built.

The map type cannot be passed in the URL: the map parameters are kept as in the previous user session.

URL example:

yandexmaps://maps.yandex.ru/?rtext=59.967870,30.242658~59.898495,30.299559&rtt=mt

HTML link example:

<a href="yandexmaps://maps.yandex.com/?rtext=59.967870,30.242658~59.898495,30.299559&rtt=mt">Get directions</a>

Sample Objective-C call:

[[UIApplication sharedApplication] openURL:
 [NSURL URLWithString:@"yandexmaps://maps.yandex.ru/?rtext=59.967870,30.242658~59.898495,30.299559&rtt=mt"]];

Show a panorama from a specified point

To show a panoramic view from a specified point, use the following URL:

yandexmaps://?{parameters}

Parameter

Data type

Description

panorama[point]

float,float

Coordinates of the point of the panoramic view (longitude, latitude).

panorama[direction]

float,float

View direction.

Set in degrees, in the format: [direction azimuth, angle of elevation above the horizon].

Acceptable values: from 0 to 360 degrees.

panorama[span]

float,float

Size of the viewport.

Set in degrees, in the format: [horizontal size, vertical size].

URL example:

yandexmaps://?panorama[point]=37.444075,55.776788&panorama[direction]=228.970000,6.060547&panorama[span]=130.000000,71.919192

HTML link example:

<a href="yandexmaps://?panorama[point]=37.444075,55.776788&panorama[direction]=228.970000,6.060547&panorama[span]=130.000000,71.919192">Panorama</a>

Sample Objective-C call:

[[UIApplication sharedApplication] openURL:
 [NSURL URLWithString:@"yandexmaps://?panorama[point]=37.444075,55.776788&panorama[direction]=228.970000,6.060547&panorama[span]=130.000000,71.919192"]];

Previous
Next