Converts map coordinates to screen coordinates.
FromMapPoints(MapDescription MapDescription, ImageDisplay MapImageDisplay, Multipoint MapPoints, out int[] ScreenYValues)
Parameter |
Description |
MapDescription
|
Used to define map extent in map units.
|
ImageDisplay |
Used to define the map image extent in pixels. |
MapPoints |
A Multipoint object containing one or more coordinates in map units. Each coordinate is stored as a PointN object.
|
ScreenYValues |
An integer array containing the Y values for coordinates converted from map to pixel units. The array is populated when the method is called.
|
Return Value
An integer array containing the X values for coordinates converted from map to pixel units.
Remarks
To convert between map and pixel units, the
origin for both must be determined. The origin
for coordinates in map units is located in the lower left corner of the
map image. The map origin is the minimum x and
y value of the current map extent. The origin for
coordinates in pixel units is located in the upper left corner of the
map image. The pixel origin is always 0,0.
Note that the map service will maintain aspect ratio, so the map extent
provided as part of the MapDescription may be different than the map extent
used to generate the pixel coordinates. To get
the map extent used in the calculation, call ExportMapImage with the same
MapDescription and ImageDisplay (as part of ImageDescription). A
MapImage is returned where the Extent property references the map extent
used by the FromMapPoints method.
Examples