Launch Yandex Maps Android app

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

You can launch mobile Yandex Maps for Android from a Java app or browser page. Use the yandexmaps URL scheme to launch the app. Yandex Maps can run the following actions on launch:

Support for geo scheme section shows how to open the map using a different URI scheme. With this method, the user can choose which app to open.

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/?ll37.619902,55.753716&z11&lmap

HTML link example:

<a href="yandexmaps://maps.yandex.com/?ll37.619902,55.753716&z11&lmap">Moscow map</a>

Sample Java call:

Uri uri = Uri.parse("yandexmaps://maps.yandex.ru/?ll37.619902,55.753716&z11&lmap");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

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=37.673098,55.757134&z=12&l=map

HTML link example:

<a href="yandexmaps://maps.yandex.com/?pt=37.673098,55.757134&z12&l=map">Placemark</a>

Sample Java call:

Uri uri = Uri.parse("yandexmaps://maps.yandex.ru/?pt=37.673098,55.757134&z12&l=map");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

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=37.619902,55.753716&z=16&text=кафе%20с%20wi-fi

HTML link example:

<a href="yandexmaps://maps.yandex.com/?ll37.619902,55.753716&z16&text=cafe%20with%20wi-fi">Found</a>

Sample Java call:

Uri uri = Uri.parse("yandexmaps://maps.yandex.ru/?ll=37.619902,55.753716&z=16&text=кафе%20с%20wi-fi");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

Open organization card

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

yandexmaps://maps.yandex.ru/?{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=1221676748

HTML link example:

<a href="yandexmaps://maps.yandex.com/?oid=1221676748">Museum</a>

Sample Java call:

Uri uri = Uri.parse("yandexmaps://maps.yandex.ru/?oid=1221676748");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

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 Java call:

Uri uri = Uri.parse("yandexmaps://?whatshere[point]=37.444075,55.776788&whatshere[zoom]=17");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

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, the value from the previous user session is used. If this information is not available, a driving route is built by default.

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=55.745719,37.604337~55.76009,37.648801&rtt=mt

HTML link example:

<a href="yandexmaps://maps.yandex.com/?rtext=55.745719,37.604337~55.76009,37.648801&rtt=mt">Get directions</a>

Sample Java call:

Uri uri = Uri.parse("yandexmaps://maps.yandex.ru/?rtext=55.745719,37.604337~55.76009,37.648801&rtt=mt");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

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">Bridge</a>

Sample Java call:

Uri uri = Uri.parse("yandexmaps://?panorama[point]=37.444075,55.776788&panorama[direction]=228.970000,6.060547&panorama[span]=130.000000,71.919192");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

Support for geo scheme

The Yandex Maps app supports the geo scheme. Other Android apps also support this scheme. The following example shows how to open the map of Seattle.

The map center coordinates and zoom are specified in the URI.

// Opening the map of Seattle.
Uri uri = Uri.parse("geo:47.6,-122.3?z=11");Intent intent = new Intent(Intent.ACTION_VIEW, uri);startActivity(intent);

If the user's mobile device has multiple matching apps installed, the user will be prompted to choose the app for opening the map.

Note

Before calling the startActivity method, you can check whether the Yandex Maps app is installed on the user's device.