English

Bug: IdentifyAll returns incorrect layer name

Description

For each layer in the map, the HTML Viewer's IdentifyAll tool returns the active layer's name if no features found in that particular layer.

Cause

This behavior is caused by is a bug in the aimsIdentify.js file. If the feature count is greater than zero for a particular layer, then layerIndex is correctly appended to the output form. However, if the feature count is zero for a particular layer, the ActiveLayerIndex is appended to the output form.

Workaround

Edit the aimsIdentify.js (Javascript file) to append layerIndex instead of ActiveLayerIndex to the output form.

  1. Open the aimsIdentify.js file in a text editor. The file is found in the HTML Viewer website's \javascript folder.
  2. Find the function named writeOutDataPage.
  3. Near the end of the function, find the following lines of code:
    Code:

    sendMapXML();
    }
    } else {
    dataString += '<center><FONT FACE="Arial" SIZE="-1"><B>' + LayerName[ActiveLayerIndex] +'</B></font><FONT FACE="Arial" size="-2">\n';
    dataString += '<br>' + msgList[64] + '<br>\n';

  4. Change the array index for LayerName from ActiveLayerIndex to layerIndex, as shown here:
    Code:

    sendMapXML();
    }
    } else {
    dataString += '<center><FONT FACE="Arial" SIZE="-1"><B>' + LayerName[layerIndex] +'</B></font><FONT FACE="Arial" size="-2">\n';
    dataString += '<br>' + msgList[64] + '<br>\n';

  5. Save the change to the file.
  6. Reload the website in the browser. In Internet Explorer, press Ctrl+F5.

Related Information