ESRI.ArcGIS.ADF.IMS
Union(Envelope,Envelope) Method
See Also  Example Send Feedback
ESRI.ArcGIS.ADF.IMS.Geometry Namespace > Envelope Class > Union Method : Union(Envelope,Envelope) Method




env1
env2
Static method that constructs an envelope that surrounds the extents of the input envelopes.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function Union( _
   ByVal env1 As Envelope, _
   ByVal env2 As Envelope _
) As Envelope
Visual Basic (Usage)Copy Code
Dim env1 As Envelope
Dim env2 As Envelope
Dim value As Envelope
 
value = Envelope.Union(env1, env2)
C# 
public static Envelope Union( 
   Envelope env1,
   Envelope env2
)

Parameters

env1
env2

Return Value

Envelope that surrounds the two input envelopes.

Example

The following example unions the current map extent with a newly created envelope, and sets the map extent to the new envelope. The code assumes an existing MapView object.
C#Copy Code
ESRI.ArcGIS.ADF.IMS.Geometry.Envelope mapEnvelope = mapView.Extent;
 
ESRI.ArcGIS.ADF.IMS.Geometry.Envelope envelope2 = new ESRI.ArcGIS.ADF.IMS.Geometry.Envelope(23, -26, 27, -18);
 
ESRI.ArcGIS.ADF.IMS.Geometry.Envelope unionEnvelope = ESRI.ArcGIS.ADF.IMS.Geometry.Envelope.Union(mapEnvelope, envelope2);
 
mapView.Extent = unionEnvelope;
Visual BasicCopy Code
Dim mapEnvelope As ESRI.ArcGIS.ADF.IMS.Geometry.Envelope _
    = mapView.Extent
 
Dim envelope2 As New _
    ESRI.ArcGIS.ADF.IMS.Geometry.Envelope(23, -26, 27, -18)
 
Dim unionEnvelope As ESRI.ArcGIS.ADF.IMS.Geometry.Envelope _
    = ESRI.ArcGIS.ADF.IMS.Geometry.Envelope.Union(mapEnvelope, envelope2)
 
mapView.Extent = unionEnvelope

Remarks

This method constructs an envelope that surrounds the two input envelopes. The input envelopes do not need to overlap.

This is a static method, and therefore is used without first constructing an instance of Envelope.

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.