Knowledge Base - Technical Articles


Technical Article   FAQ:  How can I set a different active layer when the HTML Viewer is loaded?

Article ID: 26575
Software:  ArcIMS 4.0.1, 9.0, 9.1, 9.2, 9.3, 9.3.1
Platforms:  Windows 2000, XP, Server 2003 AIX 5.2, 5.3 Solaris 8, 9, 10 HP-UX 11.00, 11.11 Linux-SUSE Server 8.0, Server 9 RHEL 3, 4

Question

How can I set a different active layer when the HTML Viewer is loaded?

Answer

By default, the topmost feature layer is set as the active layer when HTML Viewer is loaded. This initial active layer can be modified in two ways:

1. Editing the HTML Viewer code as follows:

A. Open aimsLayers.js file from ArcIMS/website/<website_name>/javascript folder in a text editor and locate the following line:

if (ActiveLayerIndex>=layerCount) ActiveLayerIndex = 0;

B. Set the desired ActiveLayer immediately before this line by adding the line shown below:

ActiveLayerIndex=<number of the preferred active layer>;

if (ActiveLayerIndex>=layerCount) ActiveLayerIndex = 0;


 The ActiveLayerIndex starts with '0' for the topmost layer and its value increases in top to bottom order. So for the third layer to be active, insert the number 2.

2. Passing the ActiveLayer as an URL parameter. See the article in the Related Information section below for more information.

Related Information

  • What parameters can be passed to an HTML Viewer's URL?
    The ArcIMS HTML Viewer's URL can accept the following argument/value pairs to override initial display values: • Host = Hostmachine Name of Host, if not default. • Service = MapService Replaces the MapService defined in the site's ArcIMSpa...

Created: 4/12/2004
Last Modified: 3/6/2012

If you would like to post a comment, please login