PROBLEM
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.
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.
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;
}
}
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();
}
Code:
function getMoreBufferData(startRecord) {
Code:
sendToServer(imsQueryURL,theString,selectXMLMode);
Code:
sendToServer(imsQueryURL,theString,11);
Article ID:000006332
Get help from ArcGIS experts
Download the Esri Support App