layerVisibilitySelectorCheckbox()

Information

Implementation version: beta 1.08

Updated in: beta 1.10

Description

Shows or hides a layer using a checkbox.

Invocation

layerVisibilitySelectorCheckbox(
	layerName,
	checkBoxId
)

Input parameters

layerName

The name of the layer from which the dataSource will be selected. This name corresponds to the name of the entity collection (featureCollection.name). It is entered as a text string.

checkBoxId

The ID of the DOM element corresponding to the checkbox. It is received as a text string.

Use examples

This function is executed at the Front level of the web page. The checkbox is defined in the HTML, and the function call is made by specifying the name of the layer to which it will modify its display property, and also the checkbox's ID:

<div class="layerSelector">
	<input
		type="checkbox"
		id="CCTV_layer_checkbox"
		onclick="layerVisibilitySelectorCheckbox('CCTV basement','CCTV_layer_checkbox')"	
	/>
</div>