Decluttering MOLE graphics using leadering and stacking


Purpose
This sample demonstrates how to declutter MOLE force element graphics on a map control using the leadering and stacking capabilities of the MoleGroupElement class. Leadering is a decluttering method whereby the MOLE graphics are drawn as a vertical group and offset at a specified distance from a specified point. Stacking is a decluttering method whereby the MOLE graphics are drawn as a condensed cluster of slightly-offset graphics. The concepts demonstrated in this sample include the following:
  • Setting decluttering options on the IMoleGroupElement interface.
  • Using IMoleLeaderElement and IMoleStackElement to apply leadering and stacking on MOLE graphics.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample.

Data has been provided for your use with this sample. It can be found at <Your ArcGIS Developer Kit Install directory>/Samples/data/MilitaryOverlayEditor/molebasemap.mxd.
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. Build the MoleLeaderStack solution and run MoleLeaderStack.exe.
  2. Click Add Graphics. Several MOLE graphics appear on the map.
  3. Click Apply Leadering. Leadering is applied to the graphics.
  4. Click Apply Stacking. The graphics are stacked (like a deck of cards).
  5. Repeat Steps 2 through 4 to add a new set of graphics that can be leadered or stacked.
  6. Click Clear. All graphics are cleared from the map. See the following screen shots:


  7. Screen shot showing leadering applied to graphics.


    Screen shot showing stacking applied to graphics.

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.

MainForm.vb Form for displaying MOLE graphics using the Map control.
MainForm.Designer.vb Form for displaying MOLE graphics using the Map control.
MainForm.resx Resources for the form.
Download the VB.NET files
MainForm.cs Form for displaying MOLE graphics using the Map control.
MainForm.Designer.cs Form for displaying MOLE graphics using the Map control.
MainForm.resx Resources for the form.
Program.cs Secures and releases resources for the application.
Download the C# files

Download the files for all languages

See Also:

DefenseSolutions library overview–Managing MOLE graphics as standard ArcObjects
Using military symbology and symbol-based graphics
Sample: Displaying symbol-based MOLE graphics on a MapControl
Sample: Arranging MOLE graphics using manual decluttering
Sample: Using MOLE symbol-based graphics with interactive maps




Development licensing Deployment licensing
Engine Developer Kit: Military Overlay Editor Engine Runtime: Military Overlay Editor
ArcView: Military Overlay Editor
ArcEditor: Military Overlay Editor
ArcInfo: Military Overlay Editor