Previous Getting Started with IDL: Mapping Next

Reading Latitudes and Longitudes

If a map projection is displayed, IDL can return the position of the cursor over the map in latitude and longitude coordinates.

  1. Enter the command:
  2. CURSOR, LON, LAT & PRINT, LAT, LON  
    

     

    The CURSOR command reads the "X" and "Y" positions of the cursor when the mouse button is pressed and returns those values in the LON and LAT variables. Use the mouse to move the cursor over the map window and click on any point. The latitude and longitude of that point on the map are printed in the Output Log.

     

  3. When you are finished with your map, dismiss the graphics window:
  4. WDELETE  
    

  IDL Online Help (March 06, 2007)