English

Problem: Field alias list does not work for the buffer result in the HTML Viewer

Description

In the HTML Viewer, when a buffer function is performed on a layer based on the selected features of a different layer, the field aliases as defined in the ArcIMSParam.js file will not be displayed in the buffer result. This problem does not occur if the buffer target layer is the same as the base layer.

Note:
See the Related Information section below for further descriptions on creating field name aliases.

Cause

While displaying the buffer result, the HTML Viewer gets the current field properties from the active layer. The data, however, is returned from the target layer. As a result, the field aliases will not be properly used.

Solution or Workaround

Edit the aimsBuffer.js file usually located under:
On Windows: <Drive:\>\ArcIMS\Website\<Website_Name>\javascript
On UNIX: $AIMSHOME/website/<Website_Name>/javascript

  • For ArcIMS 4.0.1:
    Change the getBufferAttributeData function in the aimsBuffer.js file as given below:

    Code:
    // parse XML response for selected features
    function getBufferAttributeData(theReply) {
    //setLayerFields(ActiveLayerIndex);
    setLayerFields(bufferTargetLayerIndex);
    var url = appDir + "displayBufferAttributeData.htm";
    if (useTextFrame) {
    parent.TextFrame.document.location = url;
    } else {
    var Win1 = open(url,"DataWindow","width=575,height=250,scrollbars=yes,resizable=yes");
    extWin = Win1;
    focusOnData = true;
    }

    }

  • For ArcIMS 9.x:
    1. Change the getBufferAttributeData function in the aimsBuffer.js file as given below:

    Code:

    function getBufferAttributeData(theReply) {
    var docObject = parent.MapFrame;
    var docName = "parent.MapFrame";
    if (!useTextFrame) docName = "opener.parent.MapFrame";
    var str = '<html><meta http-equiv="Content-Type" content="text/html; charset=' + charSet + '"><head><title>' + titleList[10] + '</title></head>';
    str += '<body bgcolor="' + textFrameBackColor + '" text="Black" link="Blue" vlink="Gray" LEFTMARGIN=0 onload="window.focus()" onunload="' + docName + '.focusOnData=false">';

    setLayerFields(bufferTargetLayerIndex);
    str += writeOutDataPage(theReply,bufferTargetLayerIndex,docObject,docName,Win1);
    str += '</body></html>';
    var Win1;
    //the next line is moved 3 lines above
    //setLayerFields(bufferTargetLayerIndex);

    if (useTextFrame) {
    Win1 = parent.TextFrame;
    Win1.document.open();

    } else {
    Win1 = open("","DataWindow","width=575,height=250,scrollbars=yes,resizable=yes");
    extWin = Win1;
    focusOnData = true;
    }

    Win1.document.writeln(str);
    Win1.document.close();
    hideRetrieveData();
    }

    2. In the same file, find this line:

    Code:

    function getMoreBufferData(startRecord) {


    3. Within this function, find this line:

    Code:

    sendToServer(imsQueryURL,theString,selectXMLMode);


    4. Change it to:

    Code:

    sendToServer(imsQueryURL,theString,11);

Related Information