Questions about <layer hidden>
hidden - Visibility status of the layer in the layer control
The hidden boolean attribute can be set to remove the layer from the map layer control, but it will remain displayed on the map. In order to remove the layer from the map display, it can be have its checked property toggled, or be removed from the DOM.
I find this attribute a bit weird. The hidden attribute is a global attribute in HTML, which mostly maps to 'display: none' rendering, and the semantic is that the element is not relevant in the page's current state. The layer here is rendered and so is probably relevant; just not selectable in the controls.
Why use hidden here?
Why use
hiddenhere?
I think because the word hidden had an existing use in HTML. There is the hidden boolean attribute, but there's also the <input type="hidden">, and perhaps the use of hidden here is a cross between them.
In any case, the intent was to signify that the layer would be present in the map (similar to the fact that is serialized in form submissions) but not visible in the layer control. A layer that behaves like this can be useful to reduce the cognitive burden on the user, since layers and their controls are/can be confusing to people.
There is the hidden boolean attribute, but there's also the , and
@prushforth "there's also the", the what?
I do think hidden is a source of confusion. I find myself going back to look up what disabled, hidden and checked do, all too often.
@Malvoz: there's also the <input type=hidden>. I failed to escape the element.