|
| ESRI.ArcGIS.ADF.Web | |
| ToMapPoint(Point,TransformationParams) Method | |
| See Also Example Send Feedback | |
| ESRI.ArcGIS.ADF.Web.Geometry Namespace > Point Class > ToMapPoint Method : ToMapPoint(Point,TransformationParams) Method |
- pixelPoint
- The screen Point to convert.
- 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 pixelPoint As Point, _ ByVal transformationParams As TransformationParams _ ) As Point | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim pixelPoint As Point Dim transformationParams As TransformationParams Dim value As Point value = Point.ToMapPoint(pixelPoint, transformationParams) | |
| C# | |
|---|---|
public static Point ToMapPoint( Point pixelPoint, TransformationParams transformationParams ) | |
Parameters
- pixelPoint
- The screen Point to convert.
- 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 a screen point to map point. It obtains the TransformationParams from the Map control, which is assumed to be available as Map1.
| C# | Copy Code |
|---|---|
System.Drawing.Point screenPoint =
new System.Drawing.Point(125, 350);
// 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(
screenPoint, transParams); | |
| Visual Basic | Copy Code |
|---|---|
Dim screenPoint As New System.Drawing.Point(125, 350) ' 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( _ screenPoint, transParams); | |
Use this form of the method instead of ToMapPoint(Point, 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