Returns the x position for a longitude.
MapControl.GetX(longitude);
Parameters
- longitude
- A longitude value on the map.
Returns
An integer of the
x position of the longitude, relative to the map control.
Remarks
The following code example shows how to get the x and y position of a mouse click on the map by using the GetX and GetY methods.
Example
map.AttachEvent("onclick", function(e) {
alert ("Clicked point="+map.GetX(e.view.latlong.longitude)+
", "+map.GetY(e.view.latlong.latitude)); }
);