So, poking around GetFeatureInfo.js, I'm looking at line ~67:
===
objRef.targetModel.setParam("wms_GetFeatureInfo", layerName);
===
Okay, that's good so far, it basically calls ModelBase, creates a new
FeatureInfo, derived from WidgetBaseXSL,
makes the request, retrieves results, and crams them into a <div>.
All is fine so far, except for the following lines in WidgetBaseXSL:
line ~104-ish
============
var outputNode = document.getElementById( objRef.outputNodeId );
var tempNode = document.createElement("DIV");
//process the doc with the stylesheet
var s = objRef.stylesheet.transformNodeToString(objRef.resultDoc);
if (config.serializeUrl && objRef.debug)
postLoad(config.serializeUrl, s);
if (objRef.debug) mbDebugMessage(objRef,
"painting:"+objRef.id+":"+s);
tempNode.innerHTML = s;
if( tempNode.firstChild != null ) { //Could be null!
tempNode.firstChild.setAttribute("id", objRef.outputNodeId);
//look for this widgets output and replace if found,
//otherwise append it
if (outputNode) {
objRef.node.replaceChild(tempNode.firstChild,outputNode);
} else {
objRef.node.appendChild(tempNode.firstChild);
}
}
==============
Here, outputNode is a new Widget with every single request. Which means
that outputNode
will never exist at the time of the GetFeatureInfo request, thus
appending GetFeatureInfo
results to the end of the feature detail list div, as opposed to
replacing them with
each subsequent request.
For instance, in the mapViewer/index.html demo, each request appends
featureInfo, over and over again,
to the tag at the bottom of the page.
I really don't believe this is 'ideal' behavior for this, and perhaps we
should rework this.
Andreas has suggested making GetFeature work more like GetMap, but I
can't presently expand on that.
(I'm sure he could)
Matthew D. Diez
Software Engineer - GIS and Meteorology
Innovative Emergency Management, Inc.
IEM CONFIDENTIAL INFORMATION PLEASE READ OUR NOTICE:
http://www.iem.com/e_mail_confidentiality_notice.html
Effective July 15, 2007 IEM Headquarters will have a new physical and mailing
address:
8550 United Plaza Blvd, Suite 501
Baton Rouge, LA 70809
If you should have any questions, please feel free to contact us at 225.952.8191
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
mapbuilder-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel