ESRI.ArcGIS.ADF.IMS
Envelope Class
Members  Example  See Also 
ESRI.ArcGIS.ADF.IMS.Geometry Namespace : Envelope Class




An object that has the properties of a rectangle and can be associated with a map, layout, or a feature.

Object Model


Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class Envelope 
   Inherits Geometry
Visual Basic (Usage)Copy Code
Dim instance As Envelope
C# 
[SerializableAttribute()]
public class Envelope : Geometry 

Example

The following example creates a new envelope and set the map extent to the envelope. The code assumes an existing MapView object.

For an example of examining the envelope in a result of a query operation, see FeatureLayer.GetFeatureCount(Filter, SelectionBuffer, out Envelope).

C#Copy Code
ESRI.ArcGIS.ADF.IMS.Geometry.Envelope mapEnvelope = 

    new ESRI.ArcGIS.ADF.IMS.Geometry.Envelope(); 

mapEnvelope.XMin = 20.0; 

mapEnvelope.YMin = -33.0; 

mapEnvelope.XMax = 30.0; 

mapEnvelope.YMax = -23.0; 

  

mapView.Extent = mapEnvelope; 

    
Visual BasicCopy Code
Dim mapEnvelope As New ESRI.ArcGIS.ADF.IMS.Geometry.Envelope()

mapEnvelope.XMin = 20.0

mapEnvelope.YMin = -33.0

mapEnvelope.XMax = 30.0

mapEnvelope.YMax = -23.0



mapView.Extent = mapEnvelope

Remarks

An Envelope defines the extent of features or layers in a map, and also may define a rectangle for displaying graphics. The envelope of a feature means the rectangle that surrounds all coordinates. An envelope consists of minimum and maximum X and Y coordinates.

Envelope is often used to define a new map extent, such as when the user draws a box on the map to zoom in.

For more information on uses of Envelope, see Geometry.

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.ADF.IMS.Geometry.Geometry
      ESRI.ArcGIS.ADF.IMS.Geometry.Envelope

See Also

© 2010 All Rights Reserved.