ESRI.ArcGIS.ADF.IMS
Visible Property
See Also  Example
ESRI.ArcGIS.ADF.IMS.Carto.Layer Namespace > Layer Class : Visible Property




Gets or sets a property to determine whether the layer is visible on the map.

Syntax

Visual Basic (Declaration) 
Public Overridable Property Visible As Boolean
Visual Basic (Usage)Copy Code
Dim instance As Layer
Dim value As Boolean
 
instance.Visible = value
 
value = instance.Visible
C# 
public virtual bool Visible {get; set;}

Example

The following example retrieves a feature layer from the MapView's layers collection, and sets the layer to visible.
C#Copy Code
FeatureLayer citiesLayer = (FeatureLayer) mapView.Layers.FindByName("Cities"); 

citiesLayer.Visible = true; 

    
Visual BasicCopy Code
Dim citiesLayer As FeatureLayer = CType(mapView.Layers.FindByName("Cities"), FeatureLayer)

citiesLayer.Visible = True

Remarks

If true, the layer will be visible when the map is drawn, unless scale factors are set and the map is not within the visible scale range (see MinScale and MaxScale).

Default is True.

See Also

© 2010 All Rights Reserved.