Arranging MOLE graphics using manual decluttering


Purpose
This sample demonstrates how to manually arrange or declutter force element graphics on a Map control. The application adds a Military Overlay Editor (MOLE) group element to the map’s graphic container and provides selections for decluttering. The following are the concepts demonstrated in this sample:
  • Setting decluttering options on the IMoleGroupElement interface
  • Manually controlling the decluttered positions of MOLE elements
  • Populating a MOLE group element with force element graphics
  • Arranging graphical elements on the map

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 MoleManualGroupDraw solution and run MoleManualGroupDraw.exe.
  2. Click the Add Group Element button. After a few moments, several MOLE force element graphics show on the map.
  3. On the drop-down box, select Leader Decluttering. The MOLE graphics are decluttered using the leadering method.
  4. On the drop-down box, select Manual Decluttering. The MOLE graphics are decluttered using the manual method (see the following screen shot).
  5. On the drop-down box, select Stack Decluttering. The MOLE graphics are decluttered using the stack method.
  6. On the drop-down box, select No Decluttering. The MOLE graphics are restored to their original undecluttered arrangement.
  7. To try other decluttering techniques, modify function/method cbDeclutter_SelectedIndexChanged.
  8. To change the number of force element graphics shown, modify function/method btnAddGroup_Click.


  9. Screen shot showing manual decluttering.

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 Main window of the application.
MainForm.Designer.vb Main window of the application.
MainForm.resx Resources for the application.
DemoSymbolIDs.vb Test symbol ID codes used by the application.
Program.vb Launches the application.
Download the VB.NET files
MainForm.cs Main window of the application.
MainForm.Designer.cs Main window of the application.
MainForm.resx Resources for the application.
DemoSymbolIDs.cs Test symbol ID codes used by the application.
Program.cs Launches 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: Decluttering MOLE graphics using leadering and stacking
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