Assembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public sealed class Envelope : Geometry, IXmlSerializable |
Visual Basic (Declaration) |
---|
Public NotInheritable Class Envelope _ Inherits Geometry _ Implements IXmlSerializable |
Remarks
An Envelope is a shape which has four sides which are parallel to the coordinate system used. It is often used to return a spatial extent or bounding box of other spatial items; for example of other geometries (Geometry.GetEnvelope, or layers (Layer.Extent). It is also commonly used to help define Viewpoint objects.
The location of an Envelope are defined by a minimum and maximum X and Y coordinate, set in the XMin, XMax, YMin and YMax properties. In order to be a valid shape, all of these properties must have a valid value; by default when a new Envelope is created, these properties are NaN (Not A Number) - use the overloaded constructors to quickly create a new valid Envelope as shown in the example code below. You can get information about the shape of an Envelope from the Height and Width read-only properties.
An Envelope also has Z (elevation) properties; ZMin, ZMax, and Depth; elevation information is NaN by default, and does not need to be specified in order for the Envelope to be valid.
In order to change the location of an Envelope, you might want to:
- Change the XMin, XMax, YMin, and/or YMax, read-write properties.
- Create a new Envelope using the overloaded constructors.
- Use the GeometryOperations class to perform a spatial operation returning an Envelope, for example the Union(Envelope, Envelope) methods.
Examples
MapDisplay disp = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay; Note mckinley = new Note("Mount Mckinley / Denali", new ESRI.ArcGISExplorer.Geometry.Point(-151.007222, 63.069444), Symbol.Marker.Recreation.Mountain); Envelope env = new Envelope(-151.5, 62.5, -150.5, 63.5); mckinley.Viewpoint = new Viewpoint(env); disp.Map.ChildItems.Add(mckinley);
Dim disp As MapDisplay = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay Dim mcKinley As Note = New Note("Mount McKinley / Denali", New ESRI.ArcGISExplorer.Geometry.Point(-151.007222, 63.069444), Symbol.Marker.Recreation.Mountain) Dim env As Envelope = New Envelope(-151.5, 62.5, -150.5, 63.5) mcKinley.Viewpoint = New Viewpoint(env) disp.Map.ChildItems.Add(mcKinley)
Inheritance Hierarchy
ESRI.ArcGISExplorer.Geometry..::.Geometry
ESRI.ArcGISExplorer.Geometry..::.Envelope