![]() ![]() |
ESRI.ArcGIS.ADF.IMS | |
ToMapPoint(Point,Envelope,Int32,Int32) Method | |
See Also Example Send Feedback |
ESRI.ArcGIS.ADF.IMS.Geometry Namespace > Point Class > ToMapPoint Method : ToMapPoint(Point,Envelope,Int32,Int32) Method |
- pixelPoint
- extent
- imageWidth
- imageHeight
Visual Basic (Declaration) | |
---|---|
Public Overloads Shared Function ToMapPoint( _ ByVal pixelPoint As Point, _ ByVal extent As Envelope, _ ByVal imageWidth As Integer, _ ByVal imageHeight As Integer _ ) As Point |
Visual Basic (Usage) | ![]() |
---|---|
Dim pixelPoint As Point Dim extent As Envelope Dim imageWidth As Integer Dim imageHeight As Integer Dim value As Point value = Point.ToMapPoint(pixelPoint, extent, imageWidth, imageHeight) |
C# | |
---|---|
public static Point ToMapPoint( Point pixelPoint, Envelope extent, int imageWidth, int imageHeight ) |
Parameters
- pixelPoint
- extent
- imageWidth
- imageHeight
Return Value
Point in Map coordinates. This example converts a screen point to a point based on map coordinates, using the current MapView's properties.
C# | ![]() |
---|---|
System.Drawing.Point screenPt = new System.Drawing.Point(35, 120); ESRI.ArcGIS.ADF.IMS.Geometry.Point mapPoint = ESRI.ArcGIS.ADF.IMS.Geometry.Point.ToMapPoint(screenPt, mapView.Extent, mapView.ImageDescriptor.Width, mapView.ImageDescriptor.Height); Label1.Text = String.Format("Map point is: {0}, {1}", mapPoint.X, mapPoint.Y); |
Visual Basic | ![]() |
---|---|
Dim screenPt As New System.Drawing.Point(35, 120) Dim mapPoint As ESRI.ArcGIS.ADF.IMS.Geometry.Point = _ ESRI.ArcGIS.ADF.IMS.Geometry.Point.ToMapPoint(screenPt, _ mapView.Extent, mapView.ImageDescriptor.Width, _ mapView.ImageDescriptor.Height) Label1.Text = String.Format("Map point is: {0}, {1}", _ mapPoint.X, mapPoint.Y) |
This method converts a location in screen pixel coordinates to map coordinates. Note that the input point is a System.Drawing.Point object, not a Point in ESRI.ArcGIS.ADF.IMS.Geometry.
This is a static (Shared) method, so that it is used without creating an instance of Point.
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