![]() ![]() |
ESRI.ArcGIS.ADF.Web | |
ToMapPoint(Int32,Int32,TransformationParams) Method | |
See Also Example Send Feedback |
ESRI.ArcGIS.ADF.Web.Geometry Namespace > Point Class > ToMapPoint Method : ToMapPoint(Int32,Int32,TransformationParams) Method |
- pixelX
- The screen x-coordinate.
- pixelY
- The screen y-coordinate.
- transformationParams
- Information about the transformation, including map extent, size, projection and rotation, and whether the transformation is to map coordinates or to screen pixels.
Visual Basic (Declaration) | |
---|---|
Public Overloads Shared Function ToMapPoint( _ ByVal pixelX As Integer, _ ByVal pixelY As Integer, _ ByVal transformationParams As TransformationParams _ ) As Point |
Visual Basic (Usage) | ![]() |
---|---|
Dim pixelX As Integer Dim pixelY As Integer Dim transformationParams As TransformationParams Dim value As Point value = Point.ToMapPoint(pixelX, pixelY, transformationParams) |
C# | |
---|---|
public static Point ToMapPoint( int pixelX, int pixelY, TransformationParams transformationParams ) |
Parameters
- pixelX
- The screen x-coordinate.
- pixelY
- The screen y-coordinate.
- transformationParams
- Information about the transformation, including map extent, size, projection and rotation, and whether the transformation is to map coordinates or to screen pixels.
Return Value
Point in Map coordinates. This example converts x/y screen coordinates to a map point. It obtains the TransformationParams from the Map control, which is assumed to be available as Map1.
C# | ![]() |
---|---|
// 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.Point mapPoint =
ESRI.ArcGIS.ADF.Web.Geometry.Point.ToMapPoint(
125, 350, transParams); |
Visual Basic | ![]() |
---|---|
' 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 mapPoint As ESRI.ArcGIS.ADF.Web.Geometry.Point = _ ESRI.ArcGIS.ADF.Web.Geometry.Point.ToMapPoint( _ 125, 350, transParams); |
Use this form of the method instead of ToMapPoint(int, int, Envelope, int, int) 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