A.B.C.

You are here: Home > Cartography > Publish QGIS projects to the web

Publish QGIS projects to the web

1. Needed Components

For this example, I installed the following software:

  • QGIS Bonn 3.2.0
  • Plugin qgis2web 3.3.1

You will also need a QGIS project.

2. How-to

First of all, prepare your GIS project.

QGIS Map

Then, choose the Create web map button or the menu Web > qgis2web > Create web map.

This will open the Export to web map dialog (please note, that it may be behind the QGIS window).

On the tab Layers and Groups, select the layers you want to export. If you uncheck the Layers visibility checkbox, the layer is exported but the objects will not be shown on the map.

On the Appearance tab, choose between the Metric or Imperial units. Set all other needed setting.

Under the Export tab, specify the export folder (note that a new folder will be created in this folder).

Set some more settings.

Once this has been done, choose on the lower part which environnment should be used: OpenLayers or Leaflet (I exported both to see the differencies). If you don't have too many layers, you can generate the preview. Finally, Export your data.

2.1 Leaflet solution

The following folder structure is created.

To modify the layers' order and/or names, you need to edit the file index.html found on the root.

Finally, you can upload the whole bunch of files to your web site.

2.2 OpenLayers solution

The following folder structure is created.

To modify the layers and groups' names, you need to edit the file layers/layers.js.

Finally, you can upload the whole bunch of files to your web site.

nach oben