GraphicTracker with the map


Purpose
This sample demonstrates how to display, move, and change the properties of a graphic using the GraphicTracker initialized using a Map.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Start Visual Studio, open the solution file, and build the project.
  2. Run the application. The GraphicTracker dialog box opens as shown in the following screen shot.
  3. Add a .mxd file or data to the application.
  4. Add graphics to the GraphicTracker using the Add graphic tool.
  5. Select a graphic using the Select graphic tool (performs a HitTest).
  6. Select a graphic by ID from the drop-down list, highlight it, and change its symbol or add some text using the form controls.
  7. Move the selected graphic, or all the graphics, using the radio buttons.
  8. Examine the code attached to these commands, combo boxes, and radio buttons to fully explore the functionality of the GraphicTracker.


  9. Screen shot of the GraphicTracker map application.

GTMapForm.cs Form that contains the MapControl, ToolbarControl, and a list of instructions.
AddGT.cs Tool to add graphics to the GraphicTracker and to the map.
SelectGT.cs Tool to select graphics (perform a HitTest) on the map.
Download the C# files
GTMapForm.vb Form that contains the MapControl, ToolbarControl, and a list of instructions.
AddGT.vb Tool to add graphics to the GraphicTracker and to the map.
SelectGT.vb Tool to select graphics (perform a HitTest) on the map.
Download the VB.NET files

Download the files for all languages




Development licensing Deployment licensing
Engine Developer Kit Engine
ArcGIS for Desktop Basic
ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced