void setVisibility(bool makeVisible)
This method sets the layer’s visibility on or off, depending on whether makeVisible is TRUE or FALSE, respectively. This method is the only way for a client to effect the visibility of permanent features, and the setting effects all features in the layer at once. Thus, if independently controlling visibility of particular groups of features is important to your application, you must be certain that those groups are in separate layers when you design your data profile (See Data Profilers).
This method can also be used on transient layers to set the visibility of all transient features of a particular type, e.g. lines, at once. (However, it is also possible to set the visibility of individual transient features by CARIS Key or groups of transient features by Feature Code or Source ID, via FeatureAPI.setVisiblity.)
The effect of this method is not immediate, i.e. the change in visibility is not applied to the view. To apply the change, call MapAPI.applyLayerChanges. Thus, the visibility of multiple layers can be changed efficiently, i.e. without immediate redraw.