| MGMap.getLon |
|
double getLon()
Gets the longitude (X) value in decimal degrees of the center of the map area currently displayed.
Longitudes are positive east of the Greenwich meridian and negative west of the meridian.
double - Longitude, or theX coordinate if an arbitrary coordinate system is being used.
none
The following example is designed to work with the Tutorial.mwf file that is included with Autodesk MapGuide Author. It displays a dialog box showing the Lat/Lon coordinates for the center of the visible map area:
function showCenterCoords()
{
var map = getMap();
alert( "Lat: " + map.getLat() + "\nLon: " + map.getLon() );