Sample Java Viewers Setup

Several sample implementations of the Java Viewer have been provided with ArcIMS. They demonstrate a variety of functions and graphic designs. A general set of instructions, along with a description and requirements for running each sample are provided below. You should have a working knowledge of creating ArcIMS Services and browsing ArcIMS Web sites to work with the samples.

The sample viewers are set up to work with a default installation of ArcIMS. The directory structure of the sample viewers is as follows:

Directory type

Windows

Linux or UNIX

Map configuration file (.axl)

<ArcIMS Installation Directory>\ArcIMS\Samples\Viewers\AXL

<ArcIMS Installation Directory>/ArcIMS/Samples/Viewers/AXL

Data

<ArcIMS Installation Directory>\ArcIMS\Samples\TutorialData

<ArcIMS Installation Directory>/ArcIMS/Samples/TutorialData

Sample viewer Web site

<Drive>:\ArcIMS\Website\javaviewer

<Web Site Directory>/website/javaviewer

General instructions for setting up samples

Windows:

·         If you did a Custom Installation of ArcIMS, the directory containing the sample viewer Web sites and the JavaScript files must be copied to the correct location.

Copy <ArcIMS Installation Directory>\ArcIMS\Samples\Viewers\javaviewer to  <Drive>:\ArcIMS\Website\javaviewer

Note: If you are using the Web Server root directory instead of the \Website directory, copy \javaviewer there.

·         If you changed the default directory locations during the installation, you must update the map configuration files (.axl) with the new data location.

Go to <ArcIMS Installation Directory>\ArcIMS\Samples\Viewers\AXL, open each configuration file and change the <SHAPEWORKSPACE> element to point to the correct data directory.

Linux and UNIX:

·         The directory containing the sample viewer Web sites and the JavaScript files must be copied to the correct location.

Copy <ArcIMS Installation Directory>/ArcIMS/Samples/Viewers/javaviewer to  <Web Site Directory>/website/javaviewer

Note: If you are using the Web Server root directory instead of the \Website directory, copy \javaviewer there.

·         Update the map configuration files (*.axl) to reflect a UNIX path structure.

Go to
<ArcIMS Installation Directory>/ArcIMS/Samples/Viewers/AXL, open each configuration file and change the <SHAPEWORKSPACE> element to point to the correct data directory using UNIX path structure.

JavaScript Function Files

The following JavaScript function files are included with all the samples.

·         appletColors.js—functions to set applet colors.

·         default.js—main parameter file that configures the Java viewer.

·         functions.js—functions to call methods in the Java Viewer Object Model.

·         resource.js—arrays holding text to be displayed in viewer.

Descriptions of the Samples and Setup Requirements

Generic Map

Description:

This sample viewer allows you to select a map configuration file (.axl) to display.  This provides a way to test the Java Custom viewer without creating an ArcIMS service and a Web site.  Setup requirements:

1.      Create a map configuration (.axl) file.

2.      In the browser, type in the URL to your host website javaviewer directory
(e.g. http://<ArcIMS host>/website/javaviewer)

3.      Click Generic Map and click the Open Project tool. Choose an AXL file and click Open. 

Web site files:

In \javaviewer\Generic, the frame.htm defines each of the files that create the entire Web page.  For example, map.htm, bottom.htm, and overview.htm. 

Black Tie

Description:

This sample viewer presents a custom black interface with a text-based toolbar.

Setup requirements:

1.      Create a Feature Service named SanFranFeature (case-sensitive) from sf.axl

2.    Go to /javaviewer/BlackTie and open the default.axl in a text editor.  Look for the <FEATURESERVERWORKSPACE> tag, and change the ArcIMS host name in the url attribute.

3.      In the browser, type in the URL to your host website javaviewer directory
(e.g. http://<ArcIMS host>/website/javaviewer).

4.      Click Black Tie.  All functions work the same as the default Java Custom viewer.

Web site files:

In \javaviewer\BlackTie, the frame.htm defines each of the files that create the entire Web page.  For example, map.htm, bottom.htm, and overview.htm.  Look at each of these html files and notice that each one has the background color set to black.