The easiest way to work with layers is using the layer-component. Drag a layer component on the stage
and resize it to your needs. Go into the properties and add the map instance name. The layers will be shown
inside a listbox. Every layer has a checkbox so the user can turn on/off layers. The eye will tell the user
if the actual layer is visible in the displayed area.
,D
grouped layer can be used to group a number of layers under the same name. Example "Elevation:DTM 1x1,DTM 3x3" will group layers DTM 1x1 and DTM 3x3 together into the name Elevation.
This example shows you such an implementation.
Layers can also be programmatically turned on and off. Simple use the my_map.getLayer("title") and change one of it's parameters such as .visible or .where = ''...