1.9. How to create map styles for data visualization

Style is a special type of resource necessary to visualize geodata on Web Map or with WMS service When displaying a data layer on a Web Map or publishing it using WMS protocol, you actually use its style which describes how geodata is visually presented on a map.

The only exception are WMS layers and TMS layers which don’t need you to create Styles, because the information about their visualization is passed to Web GIS from the external server.

Web GIS supports several types of Styles.

To create a default QGIS style, just press the blue button on the resource page of the layer.

../../_images/default_style_select_en.png

Pic. 1.30. Creating default QGIS style

1.9.1. QGIS style

  1. Open the Properties page of the layer for which you want to create a style;

  2. Select Create resource ‣ QGIS style on the right side of the Web GIS admin console;

  3. In the opened dialog, Go to QGIS style tab and upload a file in QML format created with QGIS (learn how to create QML file with QGIS);

  4. Press Create button. If Style is created successfully, you’ll see its name in Child resources pane of the relevant layer.

../../_images/QGIS_style_select_en.png

Pic. 1.31. Selecting QGIS style

../../_images/QGIS_style_upload_en.png

Pic. 1.32. Uploading QML file

You can type a custom name for the new style in the field Display name of the Resource tab.

../../_images/QGIS_style_name_en.png

Pic. 1.33. Display name field of a QGIS style

Simple vector styles can be edited directly from NextGIS Web (more about it here).

Note

For Vector layers uploaded to Web GIS with desktop app QGIS a QGIS style is created automatically.

1.9.2. MapServer style

  1. Open the Properties page of a Vector layer or PostGIS layer for which you want to create a style;

  2. Select Create resource ‣ MapServer style on the right side of the Web GIS admin console;

  3. Press Create button. If Style is created successfully, you’ll see its name in the Child resources pane of the relevant Vector layer or PostGIS layer.

../../_images/mapserver_style_select_en.png

Pic. 1.34. Selecting MapServer style

You can type a custom display name for the new style in the Resource tab and edit style parameters in the MapServer style tab.

../../_images/mapserver_style_name_en.png

Pic. 1.35. Display name field of a MapServer style

Examples of MapServer style can be found here.

1.9.3. Raster style

  1. Open the Properties page of Raster layer for which you want to create a style;

  2. Select Create resource ‣ Raster style on the right side of the Web GIS admin console;

  3. Press Create button. If Style is created successfully, you’ll see its name in Child resources pane of the relevant Raster layer.

Note

For Raster layers uploaded to Web GIS with desktop app QGIS a Raster style is created automatically.

../../_images/raster_style_select_en.png

Pic. 1.36. Selecting “Raster style”

You can type a custom name for the new style in the field Display name of the Resource tab.

../../_images/raster_style_create_en.png

Pic. 1.37. Creating Raster style with a custom name

Read more on how to create and edit Styles here.