MOLE basic symbols


Purpose
This sample application illustrates some of the ways that MOLE basic symbols can be used to produce a simple interactive map display. This application provides a standard map–TOC–toolbar arrangement with an additional toolbar made using Swing controls.

How to use

See How to use ArcGIS samples for help on 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/mole/mole_base.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. Run the application. When the application opens, it loads a map from the MOLE sample data in the ArcObjects software development kit (SDK) for the Java platform.
  2. Click the Add MOLE symbol button, then click the map a few times. Each time you click the map, the symbol whose ID appears in the text box appears on the map. You can edit the symbol ID in the text box, or let it be replaced randomly each time you click. You can edit the size of the symbol in the numeric text box next to the symbol ID; this size is relative to the screen.
  3. Click the Add a sample line graphic button a few times. Each time you click, a random fix task line appears in the current view extent.
  4. Click the Add a sample area graphic button a few times. Each time you click, a random obstacle restricted area appears in the current view extent.
  5. Click the Select & Drag Graphics button, click graphics to select them, drag the graphics to move them, then click an empty part of the map to clear the selection.
  6. Click the Move units button to move all units on the map 3/4 degrees east and 3/4 degrees north.
  7. Click the Create 200 graphics button to add force elements to the display.
  8. To use the Engine toolbar, neither the Select & Drag Graphics nor the Add MOLE symbol button can be selected.
  9. In action Add200, you can alter the number of graphics by changing the for loop's limit. You can also change the radius ratio and the number of force elements in each circular arrangement.
  10. In action AddArea, uncomment the fill color and outline symbol settings to see more colorful and diverse areas.
  11. In action AddLine, uncomment the line color and width settings to see more color and diverse arrows.
  12. In action MoveUnits, experiment with different delta vectors, or add a state machine to make the symbols follow a path.
  13. In drawSymbol, uncomment the fill setting to see what force elements look like with no fill.
  14. In getLabels, comment and uncomment various combinations of property settings and observe the results.
  15. In selectElements, experiment with different search tolerances. Zoom in to a region of the world and observe the selection behavior. Compute a search tolerance relative to the current map extent.

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.


Download the files for Java
defensesolutions/MoleBasicSymbols.java Contains the main class implementation.
defensesolutions/MapTocToolbar.java Contains the user interface and code generator output.
defensesolutions/DemoSymbols.java Contains an array of warfighting symbols.




Development licensing Deployment licensing
Engine Developer Kit: Military Overlay Editor Engine Runtime: Military Overlay Editor