Locate Coordinates Map control


Purpose This sample shows how to use the CoordinateTool class to determine decimal degree; degrees, minutes, and seconds (DMS); universal transverse Mercator (UTM); and Military Grid Reference System (MGRS) coordinates in a Map control for a given location. The coordinates are generated from the MapControl MouseDown event and are displayed in text boxes in the form.
 
A shapefile is loaded into the Map control at run time, and the path to the shapefile is hardcoded to the Samples\data folder. If this path does not work for any reason, change the path to the desired folder and rebuild the executable.

How to use

See How to use ArcGIS samples for help running the sample.

  1. Run the application.
  2. Click the Map control. The corresponding coordinates are displayed.

Additional information

Many of the ArcGIS Military Analyst and MOLE extension application programming interface (API) objects you have used in the past have equivalent or near equivalent objects in the ArcGIS 10 ArcObjects API. These new objects should now be used and do not require a Military Analyst extension or MOLE extension license. See Migrating from Military Analyst and MOLE for information on how to accomplish tasks in ArcGIS 10 that previously required the Military Analyst and MOLE APIs.





Development licensing Deployment licensing
Engine Developer Kit: Military Analyst Engine Runtime: Military Analyst