ESRI.ArcGIS.ADF.IMS
Envelope Class
Members  Example  See Also  Send Feedback
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

Envelope Class

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.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2011 All Rights Reserved.