HOW TO
Data layers can be hidden in the Table of Contents (TOC) for the HTML Viewer by editing two files in the HTML Viewer web site.
Note: This document applies to ArcIMS 3.0 only. For versions released after 3.0, see the Customizing HTML Viewer pdf, included with the ArcIMS product.
Code:
var hideArray = new Array();
hideArray[0] = "STATES";
hideArray[1] = "canada";
Code:
var theCount = t.layerCount;
//alert(theCount);
for (var i=0;i<theCount;i++) {
if ((t.listAllLayers) || ((t.mapScaleFactor>=t.LayerMinScale[i]) && (t.mapScaleFactor<=t.LayerMaxScale[i])))
Code:
var theCount = t.layerCount;
var hideStr = t.hideArray.join();
for (var i=0;i<theCount;i++) {
if ((t.listAllLayers) || ((t.mapScaleFactor>=t.LayerMinScale[i]) && (t.mapScaleFactor<=t.LayerMaxScale[i]) && (hideStr.search(t.LayerName[i]) == -1)))
Article ID:000002061
Get help from ArcGIS experts
Download the Esri Support App