Maps API

Ctrl previousnext Ctrl

Overview of the Static API

The Static API generates a map image based on the parameter values passed to the service in a URL with the following format:

http://static-maps.yandex.ru/1.x/?lang=en-US&{URL parameters}

The substring {URL parameters} contains a sequence of pairs in the format {parameter name}={parameter value}, separated by the ampersand symbol (&).

The following example is a request for a map image of the center of Ankara with two numbered markers:


http://static-maps.yandex.ru/1.x/?lang=en-US&ll=32.810152,39.889847& \ 
size=450,450&z=10&l=map&pt=32.810152,39.889847,pm2rdl1~32.870152,39.869847,pm2rdl99

Attention! Line breaks in the examples are indicated with backslash symbols ( \ ), which you should remove when copying the examples into your web page HTML code or your browser address string.

The complete list of URL parameters is shown below.

ParameterData type and exampleDescription
l

string,[string]...

l=map

List of layers that define the type of map: map (roadmap), sat (satellite) and sat,skl (hybrid). Mandatory parameter. For more information, see Map layers and types.
ll

float,float

ll=32.810152,39.889847

Longitude and latitude of the map center in degrees; see Map center.

spn

float

spn=0.01,0.01

Range of the map's viewport by longitude and latitude (in degrees); see Viewport.

z

integer

z=10

Zoom level of the map (0-17); see Zoom level.

size

integer,integer

size=450,450

Height and width of the requested map image (in pixels); see Map size.

pt

string (MarkerDefinition1~MarkerDefinition2~...)

pt=32.810152,39.889847,pm2rdl1~32.870152,39.869847,pm2rdl99

Contains definitions of one or more markers to be displayed on the map.

Each marker definition contains its coordinates (longitude and latitude) along with information on its appearance (including style, color, size and the marker text). Marker definitions are separated by a tilda (~).

For more information, see Placemarks.

pl

string (FigureDefinition1~FigureDefinition2~...)

pl=c:ec473fFF,f:00FF00A0,w:5, \
37.51,55.83,37.67,55.82,37.66,55.74, \
37.49,55.70,37.51,55.83

Contains definitions of geometric figures (polylines and polygons) to display on the map.

The figure definition contains coordinates for its points (either a comma-separated list, or encoded), along with information on line color and thickness, and the fill color (for polygons). Figure definitions are separated by a tilda (~).

For more information, see Lines and polygons

lang string (language-region)

lang=en-US

Locale.
  • language - Two-letter language code. Specified in ISO 639-1 format.
  • region - Two-letter country code. Specified in ISO 3166-1 format.

The following locales are currently supported:

  • lang=ru-RU
  • lang=tr-TR
  • lang=en-US
For more information, see Map localization.