Adding a layer style
How to add layer styles to layers
Layers require layer styles in order to display data on the map. When you create a layer it has no styles associated with it. You need to plan which items you want to display on the map and which designs or design interfaces are required to achieve the correct overlay of data.
Adding a layer style
To add a style to a newly created layer use the following procedure:
- When you create a new layer the Styles page is displayed on completion.
- Select the more actions button from the action bar.
- Select Add style. The Create style page appears on the left hand side.
You can base a style on one of two options:
- Design - this allows you to associate the style with a design or design interface.
- WFS - this allows you to associate the style with a Web Feature Service to import and display external information on the map, see Web Feature Service style for more information.
Select the Design option and the Select design or interface form is displayed.
- Select the design or design interface that you want to associate with the style using the item picker, see [Item picker]. Select the Next button, the Style details form is displayed.
You need to complete the following form fields (all the fields are mandatory):
Name - Give your style a meaningful and unique name that can be easily identified.
Colour - This allows you to choose the colour applied to the style icon within Alloy, see Selecting Colours.
Icon - This allows you to choose an icon from the built in library within Alloy to identify the style, see Selecting Icons.
AQS builder - You can use the AQS builder to customise the style and the items that are displayed within the layer. You need to select this field to create a default query which defines the style rule, see [Using the AQS Builder].
- When you have completed all the required fields select Create. The new style details are displayed in the right panel.
So, you have now created a basic style that can be used to display items based on a design, on the map when the layer is activated. You can further customise the style query to display a refined data set if required, see Customising styles.