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




Gets or sets the full extent.

Syntax

Visual Basic (Declaration) 
Public Property FullExtent As Envelope
Visual Basic (Usage)Copy Code
Dim instance As FeatureLayer
Dim value As Envelope
 
instance.FullExtent = value
 
value = instance.FullExtent
C# 
public Envelope FullExtent {get; set;}

Example

The following example retrieves the FullExtent of a layer in the map, and zooms the map to the extent of this layer.
C#Copy Code
LayerCollection lyrColl = mapView.Layers; 

  

ESRI.ArcGIS.ADF.IMS.Carto.Layer.FeatureLayer fLayer = 

    (ESRI.ArcGIS.ADF.IMS.Carto.Layer.FeatureLayer)mapView.Layers[1]; 

Envelope fullExtent = fLayer.FullExtent; 

  

mapView.Extent = fullExtent; 

    
Visual BasicCopy Code
Dim lyrColl As LayerCollection = mapView.Layers



Dim fLayer As ESRI.ArcGIS.ADF.IMS.Carto.Layer.FeatureLayer = _

    CType(mapView.Layers(1), ESRI.ArcGIS.ADF.IMS.Carto.Layer.FeatureLayer)

Envelope fullExtent = fLayer.FullExtent



mapView.Extent = fullExtent

Remarks

This is the bounding rectangle around all features in the map layer. It is retrieved during creation of the MapService on which the MapView or LayoutView is based. If LoadLayerExtents is false in the ImageDescriptor used to initialize the MapService, then no extents are retrieved, and FullExtent will be null (Nothing).

It is possible to set FullExtent, in which case the envelope is not necessarily the bounding envelope for all features.

See Also

© 2010 All Rights Reserved.