Layer Style Reference

With style options you can customize the presentation of layer styles, changing the visual display of features. As well as changing the style of these features, you can hide features entirely. This means that you can emphasize particular components of the map or make the map complement the style of the surrounding page.

The JSON Object

The layer style option is an array of objects. Each object can represent a style of expression classification. The object with no expression key will present the default layer style.

For example, the following JSON style declaration has 2 classifications. The first style is applied to the features that have attribute “altitude” greater than 105, the second one to all features with “altitude” less than 100.

[{ "expression": "altitude>105", "label": "Bigger than 105", "showlabel": false, "visible": false, "fontcolor": "0,0,0", "outline": "255,255,255", "fontsize": "12", "iconsoverlap": 2, "url": "/icons/defaulticon", }, { "expression": "altitude<100", "label": "Less than 100", "showlabel": true, "visible": true, "iconsoverlap": 2, "outline": "255,255,255", "symbol": { "type": "box", "color": "192,0,0", "border": "255,255,0", "bw": 2, "size": 9 } }]

Point layer

Attributes

Icon