Skip to main content

Static API

Static API service generates and displays a static 2GIS map image on web pages and in applications without using JavaScript.

The image is generated based on parameters specified in the URL: image size, map center coordinates, map zoom level, and parameters of additional objects (markers, lines, and polygons).

Use Static API in the following cases:

  • on websites to show a map preview
  • in applications where interactivity is not needed
  • on pages to be printed out (for example, delivery sheets)

Getting started

1. Get access key

  1. Sign in to the Platform Manager.
  2. Create a demo key or purchase a subscription for using API. For details on service prices, see the Tariffs section.

To work with access keys, you can use the Platform Manager: for details, see the account documentation.

2. Add map

Create a URL, add your API key, and place the URL in the <img> tag on your website or application. You can place the map image anywhere on the website.

For example, the following link generates a map image with additional objects:

https://static.maps.2gis.com/2.0?s=880x450&z=14&pt=55.03652,82.91871&ls=55.03652,82.91871,55.02711,82.92131,55.02470,82.92698~w:5&pt=55.02470,82.92698~k:c~n:1&ls=55.03652,82.91871,55.03758,82.93058,55.04042,82.92996~c:ff0000&pt=55.04042,82.92996~k:c~n:2&pn=55.03687,82.89827,55.04067,82.90925,55.03636,82.91355,55.03264,82.91062,55.03489,82.90021~c:03ee10~f:03ee10a0&pt=55.03484,82.92290~k:c~c:pe&key=API_KEY

Map on Static API

Playground

To obtain a link to a static map image, specify the image size, coordinates of the map center, and the map zoom level.

Tariffs

  • Service tariff includes a fixed number of billable events per period.
  • For Static API, a billable event is a successful request that returns one static map image.
  • To find out the current prices for services, contact the manager.

What's next?