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:
https://static-maps.yandex.ru/1.x/?{URL parameters}
The substring {URL parameters}
contains a sequence of pairs in the format {parameter name}={parameter value}
, separated by the ampersand symbol (&
).
https://static-maps.yandex.ru/1.x/?lang=&ll=32.810152,39.889847&size=450,450&z=10&l=map&pt=32.810152,39.889847,pm2rdl1~32.870152,39.869847,pm2rdl99
The complete list of URL parameters is shown below.
Parameter | Data type and example | Description |
---|---|---|
Required parameters | ||
l |
| List of layers that define the type of map: map (roadmap), sat (satellite) and sat,skl (hybrid). For more information, see Map layers and types. |
ll |
| Longitude and latitude of the map center in degrees; see Map center. |
key |
| API key for the commercial version of the Static API. Required to usethe commercial version. |
Optional parameters | ||
spn |
| Range of the map's viewport by longitude and latitude (in degrees); see Viewport. |
z |
| Zoom level of the map (0-17); see Map zoom level. |
size |
| Height and width of the requested map image (in pixels); see Map size. By default, it takes the value 450x450. |
scale |
| Coefficient for scaling map objects. Takes a fractional value from 1.0 to 4.0. For more information, see Scaling map objects. |
pt |
| 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 |
| 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 |
Parameter | Data type and example | Description |
---|---|---|
Required parameters | ||
l |
| List of layers that define the type of map: map (roadmap), sat (satellite) and sat,skl (hybrid). For more information, see Map layers and types. |
ll |
| Longitude and latitude of the map center in degrees; see Map center. |
key |
| API key for the commercial version of the Static API. Required to usethe commercial version. |
Optional parameters | ||
spn |
| Range of the map's viewport by longitude and latitude (in degrees); see Viewport. |
z |
| Zoom level of the map (0-17); see Map zoom level. |
size |
| Height and width of the requested map image (in pixels); see Map size. By default, it takes the value 450x450. |
scale |
| Coefficient for scaling map objects. Takes a fractional value from 1.0 to 4.0. For more information, see Scaling map objects. |
pt |
| 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 |
| 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 |
Commercial version
Static API also provides the commercial version. You should use this version if your project does not meet one or more of the use conditions.
For the commercial version of the API, use following URL format:
https://enterprise.static-maps.yandex.ru/1.x/?key=Your API key&{additional parameters}
The commercial version of the Static API can be purchased from the Developer's Dashboard.