1.18. How to embed a Web Map on your website

All Web Maps created on nextgis.com can be easily embedded into your website.

Note

This functionality is available only to nextgis.com Mini and Premium users.

To embed a Web Map:

  • Open Web Map

  • Click on the “Share” panel on the left sidebar

  • If you wish to, customize map width and height and other parameters.

  • Copy the code

  • Paste this code to your site

../../_images/embed_webmap_en_2.png

Pic. 1.66. Sharing panel

../../_images/webmap_on_site_en.png

Pic. 1.67. Embedded Web Map example

You can preview the embedded map before publishing it by pressing Preview button.

1.18.1. Embeded map settings

Map size - width and height in pixels.

Link to the main map - to go from the site to the map page in the Web GIS.

Generate events - for integration and programmatic interaction with the iframe.

You can also embed a Web Map with additional tools and panels. This will allow users, for instance, to enable and disable particular layers.

Tools available for embeded map:

  • feature identification;

  • measuring area and distance;

  • cursor location and extent coordinates;

  • scale line;

  • initial extent;

  • marking user location;

  • zoom;

  • scale info.

You can also choose which panels will be available on the map:

  • description;

  • layers;

  • search.

If several panels are added, you can use the Active panel menu to select one of them to be displayed by default or have the map open with the panels minimized.

All settings are included in the code.

../../_images/embed_extended_en.png

Pic. 1.68. Web Map embedding settings

If you are a developer check out the code.nextgis.com library suite and the NGW API.