Select map type and get code or link
After you've created your map, you can get a code to insert it on a site, blog, or mobile app, as well as a link to see your map on the internet.
Note
You can also export your map to a file. See the Exporting map items section.
Keep the technical limitations in mind when creating your map.
Just choose your map type (click Map type in the toolbar):
-
Interactive map. This type of map is movable and users can interact with the items on it.
See Interactive map for more information.
-
Static map. This map is in PNG format. Static maps have limitations on the number of items they can include.
See Static map for more information.
-
Printable map. This is a high-resolution map image that can be printed.
For more information about this map type and current restrictions, see the Printable map section.
Interactive map
To get a code to insert your map onto your site, blog or mobile app so that users can interact with it (i.e. move or scale it, plot routes, view descriptions etc.), choose the Interactive map type:
-
Click the button
-
Enter map parameter values:
-
Map size. Map sizes can be set either by changing the numbers in the «Map size» fields (size is denoted in pixels (px)) or by changing the size of the highlighted area on the map (for more information, see the Map Constructor API).
-
Fit width option. If this option is enabled, your map will have the parameter value
width = 100%
(see the Map Constructor API section for more information about parameters). In this case, the map you embedded on your site will take up the entire width (100%) of the block element:
-
-
Go to the Map type toolbar and click Get map code.
Copy the code from the form, which will allow you to display your map on a website or blog (two HTML options are available ─JavaScript or iframe):
Alert
There are restrictions with using iframe code:
-
Only the Map type (not Satellite or Hybrid) is available
-
The map can only display at large scales
-
Not all HTML tags will work (see restrictions)
When using JavaScript code, the search, routing, and panorama features are not available on the Constructor map by default.
To use these features, you need to get an API key in Developer Dashboard for the «JavaScript API and HTTP Geocoder»product and add it to the code.
Sample code using the API key:
<script type="text/javascript" charset="utf-8" async src="https://api-maps.yandex.ru/services/constructor/1.0/js/?um=constructor:%3A053bd947d462cc1a45aeba4070defff75501905071c0eaf68436ac9976ec698c&width=602&height=400&lang=ru_RU&scroll=true&apikey=<your API key>"> </script>
Note
The JavaScript code can be modified using the Map Constructor API.
-
-
Get a link that will allow your map to be viewed online. There are two ways to do this:
-
Copy the contents of the Link to Yandex.Maps field from the Map type toolbar.
-
Go to the Map type toolbar and click Open in Yandex.Maps
.
Your map will open in Yandex.Maps along with the info panel (see above).
Click the Share
button from this panel.
In the form that opens, you can copy the link to your map (or the code that lets you display your map).
Note
To get a link, click
next to the appropriate map in your list and choose Share from the menu that opens. Then copy the link to your map from the form. See Create a map for more information.
-
Static map
Alert
Static maps have limitations on the number of items they can include.
To get a code to insert your map as a static image (which can be placed on sites that don't support JavaScript), choose the Static map type:
-
Click the button
-
Set map size. Map sizes can be set either by changing the numbers in the «Map size» fields (size is denoted in pixels (px)) or by changing the size of the highlighted area on the map (for more information, see the Map Constructor API).
-
Get map code.
Go to the Map type toolbar and click Get map code.
You can copy the code that lets you display your map from the form that opens. See the Map Constructor API section for more information.
Printable map
To save a file that contains a high-resolution, printable map image to Yandex.Disk or send your map directly to your printer in its current resolution, choose the Printable map type:
-
Click the button
-
Enter map parameter values:
-
Map size. Map size can be set either by changing the numbers in the «Map size» fields or by changing the size of the highlighted area on the map (for more information, see the Map Constructor API).
For printable maps, you can select your unit of measurement: pixels (px), inches (in) or centimeters (cm).
-
File format. Select the format (PNG or JPG) of your map file.
-
Quality. Choose your map's bitmap resolution: 96 DPI (for viewing in WEB) or 300 DPI for printing the map.
Alert
Printable high-resolution maps must meet the following conditions:
-
They are set to the "map" layer type; it's not possible to create a printable satellite or hybrid map.
-
They are large-scale maps; it's not possible to create printable maps of a zoomed-out area.
-
You are using the latest version of one of these desktop browsers: Firefox, Chrome, Yandex.Browser, Edge, Safari or Opera.
If you're not concerned with your map's resolution, click Use standard print and print the map without these restrictions.
-
-
Click Save to Yandex.Disk (for printable maps) to save your map file to your Yandex.Disk. When the operation has completed, you'll get this confirmation message:
Your file will be saved under the name you gave your map in the Yandex.Maps Constructor folder, which is created automatically on your Yandex.Disk.
Useful links
Some HTML tags don't work on the map when you use iframe:
-
Custom images in the "img" tag are not displayed
<img src="my-picture.png" />
. -
Scripts in the "script" tag don't launch
<script src=""></script>
. -
Inline styles
style="..."
and inline scriptsonclick="..."
are not processed.
Alert
There are certain restrictions on item creation:
-
You can't add more than 10,000 items to a map (which includes placemarks, lines, and polygons).
-
A line or polygon can not comprise more than 1,000 vertexes.
If the number of vertexes that an item has exceeds the maximum, then the item may be simplified automatically (i.e. the excess vertexes are deleted, but in such a way as to maintain the overall appearance of the item).