Converts a point in map coordinates to a Point in screen coordinates (pixel coordinates).
Syntax
Visual Basic (Usage) | Copy Code |
---|
Dim instance As Point
Dim transformationParams As TransformationParams
Dim value As Point
value = instance.ToScreenPoint(transformationParams) |
Parameters
- 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
Screen-point (pixel-point) of converted map Point.
Example
This example converts a map point to screen point. It obtains the TransformationParams from the Map control, which is assumed to be available as Map1.
C# | Copy Code |
---|
ESRI.ArcGIS.ADF.Web.Geometry.Point mapPoint =
new ESRI.ArcGIS.ADF.Web.Geometry.Point(
-75.0, 35.0);
// Get transformation parameters from the Map control
ESRI.ArcGIS.ADF.Web.Geometry.TransformationParams transParams =
Map1.GetTransformationParams(
ESRI.ArcGIS.ADF.Web.Geometry.TransformationDirection.ToScreen);
System.Drawing.Point screenPoint =
mapPoint.ToScreenPoint(transParams); |
Visual Basic | Copy Code |
---|
Dim mapPoint As New _
ESRI.ArcGIS.ADF.Web.Geometry.Point( _
-75.0, 35.0)
' Get transformation parameters from the Map control
Dim transParams As ESRI.ArcGIS.ADF.Web.Geometry.TransformationParams = _
Map1.GetTransformationParams( _
ESRI.ArcGIS.ADF.Web.Geometry.TransformationDirection.ToScreen)
Dim screenPoint As System.Drawing.Point = _
mapPoint.ToScreenPoint(transParams) |
Remarks
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