PixelCoord.X Property
PixelCoord.X Property
The pixel offset from the upper-left corner of a map image along the x (horizontal) axis.
Public Dim X As System.Integer = 0
[C#]
public System.Int32 X;
Example
[Visual Basic]
'Use ConvertToPoint to convert a latitude and longitude coordinate
'to a pixel coordinate
Dim myLatLongs(0) As LatLong
myLatLongs(0) = New LatLong()
myLatLongs(0).Latitude = 47.59
myLatLongs(0).Longitude = -122.34
Dim myView As New ViewByScale()
myView.CenterPoint = myLatLongs(0)
myView.MapScale = 200000
Dim pixelCoords() As PixelCoord
pixelCoords = renderService.ConvertToPoint(myLatLongs, myView, 250, 250)
Console.WriteLine(pixelCoords(0).X.ToString())
Console.WriteLine(pixelCoords(0).Y.ToString())
[C#]
//Use ConvertToPoint to convert a latitude and longitude coordinate
//to a pixel coordinate
LatLong[] myLatLongs = new LatLong[1];
myLatLongs[0] = new LatLong();
myLatLongs[0].Latitude = 47.59;
myLatLongs[0].Longitude = -122.34;
ViewByScale myView = new ViewByScale();
myView.CenterPoint = myLatLongs[0];
myView.MapScale = 200000;
PixelCoord[] pixelCoords;
pixelCoords = renderService.ConvertToPoint(myLatLongs, myView, 250, 250);
Console.WriteLine(pixelCoords[0].X.ToString());
Console.WriteLine(pixelCoords[0].Y.ToString());