Skip to content

Layer Settings


In this section, you will learn how to manage the layer settings in terms of general information, display mode, style and feature Info.
Since a layer is added to the TOC it is possible to access its settings with the dedicated button that appears selecting a layer:

The layer settings panel is composed of four sections:

  • General information

  • Display

  • Style

  • Feature Info

Warning

For WMTS layers the Style and the Feature Info sections are not implemented. Moreover the Display section is limited to the Transparency level parameter.

General information

By default, as soon as the user opens the layer settings panel the General information section appears:

In this page it is possible to:

  • Change the Title

  • Set the Title translations, that will be switched by changing the language

  • Take a look at the Name of the layer

  • Edit the layer's Description

  • Set the layer Group

  • Configure the Tooltip that appears moving the cursor over the layer's item in TOC. In this case the user can decide that the Title, the Description, both or nothing will be displayed. Moreover you can set the Placement of the tooltip, choosing between Top, Right or Bottom:

Setting a tooltip that shows the Title and the Description on the Right, for example, it can be similar to the following:

Display

Through the second section of the layer settings panel it is possible to change the display settings:

In particular, the user is allowed to:

  • Set the image format: choosing between png, png8, jpeg, vnd.jpeg-png, vnd.jpeg-png8 and gif

Note

The list of available format is the same of the related catalog source. Therefore, for WMS services, the updated list of formats supported by the WMS server is used.

  • Set the size of layer tiles: choosing between 256 or 512

  • Set the opacity value of the layer (in %)

  • Enable/disable the Visibility limits to display the layer only within certain scale limits. The user is allowed to request the MinScaleDenominator and MaxScaleDenominator value present on the WMS GetCapabilities of the layer though the button or set the Max value and the Min value and select the Limits type choosing between Scale or Resolution.

  • Enable/disable the transparency for that layer

  • Enable/disable the use of the layer cached tiles (if checked, the Tiled=true URL parameter will be added to the WMS request and to use tiles cached with GeoWebCache)

  • Decide to display the image as a single tile or as multiple tiles

  • Enable/disable the localized style. If enabled allows to include the MapStore's locale in each GetMap, GetLegendGraphic and GetFeatureInfo requests to the server, as explained in the WMS Catalog Settings

  • Set the layer Legend with custom Width and Height options. Both of these field values if greater than the default legend's size of 12, then the custom values gets applied on the legend width and height display property

  • A preview of the legend is shown with the applied custom values from Legend fields above.

Warning

The Format and Layer tile size options are available only for the layers added from CSW and WMS catalog sources.

Style

The third section, dedicated to the layer style, displays like the following:

In this case the user is allowed to:

  • Search through the available layer styles and select the desired one

  • Create a new style

  • Edit an existing style

  • Delete an existing style

Note

By the default service security rules the GeoServer's REST APIs are available only for the GeoServer administrators, so a basic authentication form will appears in MapStore to enter the Admin credentials. Without Admin rights, the editing capabilities on styles are not available and only the list of available styles will appear to allow the user to select one of them to the layer.

Take a look at the User Integration with GeoServer section of Developer Guide in order to understand how to configure the way MapStore and GeoServer share users, groups and roles. If the users integration between GeoServer and MapStore is configured, the editing functionalities of the styles will be available according to the role of the authenticated user in MapStore in a more transparent way.

Create a new style

It is possible to create a new style with a click on the button. At this stage the user can choose between different types of template from which the customization will start:

  • 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)

Note

The availability of the style formats depends, firstly, from the GeoServer. MapStore, by default, will add all the supported format that the server provides. To edit or create styles using the CSS format the CSS extension must be installed in GeoServer

Once the new style is chosen, with a click on the button the following window opens:

Here the user can set the Title and the Abstract (optional), and through the Save button the new style will be automatically added to the styles list.

Edit an existing style

Existing styles can be edited clicking on the button. The page that opens allows the user to customize the style in the related format:

The editor is easy to approach thanks also to the following functions:

  • The sintax control highlights any possible error with a red underline (if error are detected an icon with a red exclamation point will be shown in the top-right side of the editor)

  • The autocomplete function suggests the possible style's properties in order to prevents syntax errors:

  • The color picker, that can be activated through the square filled icon () near the color code, helps in choosing colors directly from the editor, showing an interface like the following:

Warning

The autocomplete and the color picker functions are available only in the CSS editor.

Visual Editor Style

MapStore also allows to edit the layers style using a Visual editor with a most user friendly UI.Clicking on the button a section opens so that the user can customize the style through with a visual style editor by adding/editing symbolizers, which can be: Mark, Icon, Line, Fill and Text. It is anyway possible to switch to the text editor mode if necessary for a more complex styling.

Once a symbolizer has been added and customized, you can:

  • Filter the style rule, as explained here, in order to apply the style only to certain layer features. It is possible clicking on the button.

  • Add a Scale denominator filter (max and min scale) to visualize the style rule only within certain scale limits. This is possible by clicking the button.

  • Remove the symbolizer by clicking the button.

Mark

The mark type allows you to add a mark to the layer: clicking on the button a mark panel appears:

The mark can have different Shape, Color, Stroke with different Color and Width and customizable Radius and Rotation. Take a look at the following example.

Icon

With the icon panel, which opens by clicking on button, the style editor is allowed to add an image as an icon (by specifying its URL) and customize the icon Opacity, Size and Rotation angle:

Line

The line rule is used to style linear features of the layer: clicking on the button a panel allows the user to edit the corresponding properties.

The editor can change the Stroke color, the Stroke width, the Line style (continuous, dashed, etc), the Line cap (Butt, Round, Square) and the Line join (Bevel, Round, Miter). An example can be the following one:

Fill

The Fill rule is used to style polygon features. Clicking on button, the editor is allowed to customize the Fill color, the Outline color and the Outline width:

Text

The Text rule is used to style features as text labels. Text labels are positioned either at points or along linear paths derived from the geometry being labelled. Clicking on the button a specific panel opens:

The editor is allowed to type the name of the layer attribute to use for the Label and the dropdown list is filtered accordingly to show the existing attributes that are matching the entered text (the user can anyway directly select an attribute from the list). Moreover, the style editor can customize the Font Family (DejaVu Sans, Serif, etc), choose the font Color, Size, Style (Normal or Italic) and Halo weight (Normal or Bold) and select the desired Halo color and Halo weight. It is also possible to choose the text Rotation and Offset (x and y). En example can be the following one

Style Methods

Different styles methods can be used for each style rule. Clicking on the button, available on top of the panel of each symbolizer, the editor can choose one of the following depending on the rule type:

  • Simple style

  • Classification style

  • Pattern mark style (available only for rules of type Line and Fill)

  • Patter icon style (available only for rules of type Line and Fill)

Simple style

The Simple style is the default style described above for each symbolizer.

Classification style

MapStore allows you to classify the style based on the attributes of the layer. The Classification style is available for Marker, Line, Fill and Text by clicking on the button and choosing the Classification style options from the dropdown menu.

It this case the editor is allowed to choose a Color ramp and the order (with Reverse order) of the classification intervals colors. It is obviously possible to select the layer Attribute to use for the classification along with the classification Method (Quantile, Equal interval, Natural breaks and Standard deviation), the number of classification Intervals and the Opacity (%) of each interval range. An example of the Classification style for a Fill rule type can be the following one:

Pattern mark style

With the Pattern mark style it is possible to represent Line or Fill style rules with a mark by clicking on the button and choosing the Pattern mark style options from the dropdown menu.

The style editor can configure a Mark as explained here along with the usual options available for rules of type line or fill depending on the selected symbolizer. Take a look at the following example of the Pattern mark style for the Line rule sample.

Patter icon style

With the Pattern icon style it is possible to represent Line or Fill style rules with an icon by clicking on the button and choosing the Pattern icon style options from the dropdown menu.

The style editor can configure the Icon as explained here along with the usual options available for rules of type line or fill depending on the selected symbolizer. Take a look at the following example of Pattern icon style for a Fill rule sample.

Feature Info Form

Through the last section of the layer settings panel, it is possible to decide the information format that appears querying a layer with the Identify Tool:

In particular, the user can choose between:

  • Disable Identify to disable the Identify for the layer

  • Text

  • HTML

  • Properties

  • Template

Note

Without selecting any format here, the Identify Tool will return the layers information with the format chosen in Map Settings (a Burger Menu option). Once a user specifies the information format in layers settings, instead, that format will take precedence over the map settings only for that specific layer.

Text

An example of layer information in text format can be:

HTML

An example of layer information in HTML format can be:

Properties

An example of layer information in properties format can be:

Templates

In this case the user can customize the information format:

In particular, by clicking on the button, the following text editor appears:

Here it is possible to insert the text to be displayed through the Identify Tool, with the possibility to wrap the desired properties.
Let's make an example: we assume to have a layer where each record corresponds to a USA State geometry in the map. In the Attribute Table of this layer there's the STATE_NAME field that, for each record, contains a text value with the name of the State.
If the goal is to show, performing the Identify Tool, only the State name, an option could be to insert the following text on the Template text editor:

In this case, by clicking on the map, the Identify Tool returns:

Using the ${properties.NAME_OF_THE_FIELD} syntax, MapStore is able to parse the response to the Identify Tool request by matching the configured placeholder.