Engine Viewer

Engine Viewer is a stand-alone sample application that provides the following functionality:
  • Open a map document (.mxd file)
  • Zoom in
  • Zoom out
  • Pan
  • Identify
It uses Java Swing technology to provide a user interface (UI) framework and the Java Image I/O application programming interface (API) to render images.
This sample demonstrate how to use a map server in a stand-alone desktop Java application.

How to use

See How to use ArcGIS samples for help on running the sample.

  1. To compile and run this application, use Ant or an integrated development environment (IDE), or execute its Java Archive (.jar) file.
  2. Open a .mxd file, such as mxds/usa.mxd, in the samples data directory (installDir/java/samples/data).
  3. Zoom in, zoom out, pan, and identify features.

Additional information

Engine Viewer contains the following components:
These actions are defined in the MapActions class. When a .mxd file is opened, the map list (combo box) is populated with the available maps, and the selections are set to the default map (focus map). A map selection from the drop-down appears in the MapComponent.
These nodes are extended from an abstract base class called Node. The MapFrame node displays the name of the map, and the layers in the map are added as Layer nodes. A check box is provided to toggle the visibility of the layers.

If you installed the samples feature, you will find the files associated with this sample in <Your Developer Kit install location>\DeveloperKit10.4\Java\Samples\ArcObjects.

scenario/toc/CheckBoxPanel.javaUtility class
scenario/map/Display.javaUtility class
scenario/map/DrawTool.javaUtility class
scenario/EngineViewer.javaMain class:
scenario/map/EnvelopeHelper.javaUtility class
scenario/map/IdentifyDialog.javaUtility class
scenario/map/IdentifyInfo.javaUtility class
scenario/map/ImagePainter.javaUtility class
scenario/toc/LabelPanel.javaUtility class
scenario/map/LayerInfo.javaUtility class
scenario/toc/LayerNode.javaUtility class
scenario/MapActions.javaUtility class
scenario/map/MapComponent.javaUtility class
scenario/toc/MapFrameNode.javaUtility class
scenario/map/MapInfo.javaUtility class
scenario/toc/Node.javaUtility class
scenario/toc/TocControl.javaUtility class
scenario/toc/TocTreeRenderer.javaUtility class
scenario/ToolBar.javaUtility class

Development licensingDeployment licensing
Engine Developer KitEngine
ArcGIS for Desktop Basic
ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced