Making Layers Hidden, Unselectable and Editable
There are four status values that control how layers are displayed:
- CMSTATUS_HIDDEN - user cannot see or interact with the item
- CMSTATUS_VISIBLE - the item will be visible but the user cannot interact with it
- CMSTATUS_SELECTABLE - the item will be visible and the user can select it but not change the item
- CMSTATUS_EDITABLE - the item is visible, can be selected, and changed
Each layer (and all items) can have one status value. If the layer is hidden or visible, it is automatically not selectable and not editable. If the layer is selectable, it is not editable. By default, layers in CanvasMap are set to STATUS_SELECTABLE so they are visible and selectable. To change the status for the layer use the following settings function:
TheLaeyer.SetSetting("Status",CMSTATUS_HIDDEN); // make it so the user can't see or select this layer TheLaeyer.SetSetting("Status",CMSTATUS_VISIBLE); // make it so the user can't select this layer TheLaeyer.SetSetting("Status",CMSTATUS_SELECTABLE); // make it so the user can select this layer TheLaeyer.SetSetting("Status",CMSTATUS_EDITABLE); // make it so the usercan select and edit the layer