You are here: Expanding Knowledge > Showing and Hiding Layers With URL Parameters

Showing and Hiding Layers With URL Parameters

This feature provides the ability to turn layers on/off by passing query parameters through the URL.

The query parameters take priority over the template definitions, thus the application will keep any layers that are shown by the default template and then it will apply the query parameters.

Usage

To add query parameters to a URL, first add a question mark (?) to the end of a fully validated URL. Then add the below query parameters as needed to show/hide the layer you want in the stick and/or bar panels. If you are using more than one parameter in the URL, the parameters will need to be separated by an ampersand (&), as shown in the Examples below.

Parameters Syntax

Description

stickOff stickOff=[Layer_ID] or stickOff=[Layer_ID],[Layer_ID],[Layer_ID] A comma separated list of layers to turn off in the stick panel.
stickOn stickOn=[Layer_ID] or stickOff=[Layer_ID],[Layer_ID],[Layer_ID] A comma separated list of layers to turn on in the stick panel.
stickLayers

[LAYER_ID]:1 or [LAYER_ID]:-1

[LAYER_ID]:1, [LAYER_ID]:1, [LAYER_ID]:1

*:1 OR *:-1

Specify a layer [Layer_ID] as visible (:1) or invisible (:-1) in the stick panel.

A comma separated grouping of layers.

* is a wildcard and means everything will be visible or invisible.

barOff barOff=[Layer_ID] or stickOff=[Layer_ID],[Layer_ID],[Layer_ID] A comma separated list of layers to turn off in the bar panel.
barOn barOn=[Layer_ID] or stickOff=[Layer_ID],[Layer_ID],[Layer_ID] A comma separated list of layers to turn on in the bar panel.
barLayers

[LAYER_ID]:1 or [LAYER_ID]:-1

[LAYER_ID]:1, [LAYER_ID]:1, [LAYER_ID]:1

*:1 OR *:-1

Specify a layer [Layer_ID] as visible (:1) or invisible (:-1) in the bar panel.

A comma separated grouping of layers.

* is a wildcard and means everything will be visible or invisible.