![]() ![]() |
ESRI.ArcGIS.ADF.Web | |
ToMapEnvelope(Rectangle,TransformationParams) Method | |
See Also Example Send Feedback |
ESRI.ArcGIS.ADF.Web.Geometry Namespace > Envelope Class > ToMapEnvelope Method : ToMapEnvelope(Rectangle,TransformationParams) Method |
- screenRectangle
- transformationParameters
Visual Basic (Declaration) | |
---|---|
Public Overloads Shared Function ToMapEnvelope( _ ByVal screenRectangle As Rectangle, _ ByVal transformationParameters As TransformationParams _ ) As Envelope |
Visual Basic (Usage) | ![]() |
---|---|
Dim screenRectangle As Rectangle Dim transformationParameters As TransformationParams Dim value As Envelope value = Envelope.ToMapEnvelope(screenRectangle, transformationParameters) |
C# | |
---|---|
public static Envelope ToMapEnvelope( Rectangle screenRectangle, TransformationParams transformationParameters ) |
Parameters
- screenRectangle
- transformationParameters
Return Value
The map envelope. This example converts a screen rectangle to an envelope in map coordinates.
C# | ![]() |
---|---|
// Create rectangle (x, y, width, height) System.Drawing.Rectangle screenRectangle = new System.Drawing.Rectangle(35, 125, 200, 200); // Get transformation parameters from the Map control ESRI.ArcGIS.ADF.Web.Geometry.TransformationParams transParams = Map1.GetTransformationParams( ESRI.ArcGIS.ADF.Web.Geometry.TransformationDirection.ToMap); ESRI.ArcGIS.ADF.Web.Geometry.Envelope mapEnvelope = ESRI.ArcGIS.ADF.Web.Geometry.Envelope.ToScreenRectangle( screenRectangle); |
Visual Basic | ![]() |
---|---|
' Create rectangle (x, y, width, height) Dim screenRectangle As New System.Drawing.Rectangle(35, 125, 200, 200) ' Get transformation parameters from the Map control Dim transParams As ESRI.ArcGIS.ADF.Web.Geometry.TransformationParams = _ Map1.GetTransformationParams( _ ESRI.ArcGIS.ADF.Web.Geometry.TransformationDirection.ToMap) Dim mapEnvelope As ESRI.ArcGIS.ADF.Web.Geometry.Envelope = _ ESRI.ArcGIS.ADF.Web.Geometry.Envelope.ToScreenRectangle( _ screenRectangle) |
Use this form of the method instead of the other forms of ToMapEnvelope in order to account for rotation of the Map. The TransformationParams may be obtained from the Map with Map.GetTransformationParams.
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