Skip to content

Layer Settings


In this section, you will learn how to manage the layers, to set the display mode and the style of the layers, and to set the format of the feature info.

  • Add a layer and Select it.
  • Click on to access the settings.

General Settings Form

On the first page of the form, you can change the Title of the layer, translate it in several languages, add a description and assign it to a new Layer Group as seen in the TOC.

Display Form

On the second page, you can set the rendering options of the layer such as the image format and the opacity (transparency). You can enable/disable the use of the cache (if checked the Tiled=true URL parameter will be added to the WMS request) and displaying the layer as a single tile.

Style Form

On the third page, you can choose a style from the list and apply it to the layer.

Style Editor

If you have any editing grants on the styles' source, you can customize layers' styles through the Style Editor.

style_editor

The Style Editor tool provides its functionalities on top of GeoServer REST APIs, so the styling functionalities are available only for those layers that are loaded in MapStore 2 from GeoServer. By default the GeoServer's REST APIs are available only for the GeoServer administrators, so a basic authentication form will appears in MapStore2 to enter the Admin credentials. Without Admin rights, the editing capabilities on styles are not available and only a list of the available styles will be shown in order to assign one of them to the selected layer. If the users integration between GeoServer and MapStore2 is configured, the editing functionalities of the styles will be available according to the role of the authenticated user in MapStore2 in a more transparent way.
Once done these requirements' checks you can edit an existing style or create a new one from scratch.

Edit styles

  • Click on the Edit selected style button if you want to edit an existing style.

    style_editor_edit_style

  • Click on the Save current style button style_editor_save_current_style to save your changes

  • Click on the Back to style list button style_editor_back_button to go back without saving the changes.

Create new styles

  • Click on the Create new style button style_editor_new_style_button if you want to create your style from scratch. MapStore 2 shows you some style templates from which you can start your customization. Those templates can be:

    • CSS - Cascading Style Sheet (a language used for describing the presentation of a document written in a markup language like the HTML)

    • SLD - Styled Layer Descriptor (an XML schema specified by the Open Geospatial Consortium (OGC) for describing the appearance of map layers)

  • Select a style template

  • Click on the Add selected template to list of styles button style_editor_add_style_button

  • Enter a Title (and an Abstract if you want to) for your style

    style_editor_new_style_name

  • Click on Save

  • Now you can see your new style in the styles' list and Edit it through the editor

    style_editor_edit_new_style

As you can see the Style Editor has a syntax control function that highlights any possible error with a red underline. If errors are detected an icon with a red exclamation point style_editor_error_icon will be shown in the top-right side of the editor:

style_editor_syntax_error

The autocomplete function suggests you the style's properties names and prevents syntax errors:

style_editor_autocomplete

Another useful tool is the color picker that allow you to choose colors, directly from the editor, via an interface with a visual representation of a color:

style_editor_color_picker

Click on the square filled icon (style_editor_color_picker_icon) near the color code to activate this function.

Feature Info Form

On the fourth page, you can set the format of the extracted information from a feature or a pixel location when querying a layer.

The Identify button, located in the Side bar, is enabled by default and allows you to query objects on the map by clicking on it. You can choose to get the info in Plain Text, HTML, Properties List or to customize your own template. An example is shown below:

  • Select the HTML format, Then Save it.

  • Click on the layer. The info will be returned as a record (row) of a table corresponding to the info of that feature element of the layer.