MOLE stacking


Purpose
This sample demonstrates how to use a MOLE graphic group stack proximity rule. The rule states that graphics placed within a 10 percent proximity of another graphic become members of a graphic group stack. Graphics are placed on the map using a mouse click event.

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/world/dissolvecntry.shp.
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 first opens, it loads a map from the MOLE sample data in the ArcObjects software development kit (SDK) for the Java platform.
  2. Use the Graphic Parameters Section to draw a graphic using the default FEGraphicStyle.
  3. Check Draw Graphic on Click or Draw 3 Graphics on Click.
  4. Input the name, parent symbol ID, or angle, then click the map.
  5. Click the Clear Graphics command to remove all the graphics from the map.
  6. Click the Set Rotation command to apply a rotation to all the graphics in the display list. This requires that a rotation angle be provided in the Graphic Parameters.
  7. Click the Bitmap Stack command to generate a bitmap of the most recent stack created. The resulting bitmap is placed in a new form.
  8. Click the Export Stack command to export the most recent stack created to a directory on disk. Modify this path in the code to change the output directory.
  9. Click the Bitmap Leader command to generate a bitmap of the most recent leader created. The resulting bitmap is placed in a new form.
  10. Click Export Leader command to export the most recent leader created to a directory on disk. Modify this path in the code to change the output directory.

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/DisplayListStacking.java Contains the main class implementation.
defensesolutions/PictureViewer.java Contains a JFrame to display an image.




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