My below GetFeatureInfo command is working correctly and whenever I click on
the feature it displays the correct information about the feature into a div I
created called 'nodeList'. Well I am trying to get this info to be shown in a
popup like the example on the site using popup.js but it won't work. Now I can
create the popup no problem (empty) but not sure how to add the getfeatureinfo
response to the popup as the example uses a openlayers control instead. Any
help appreciated!
//support GetFeatureInfo
map.events.register('click', map, function (e) {
new OpenLayers.Util.getElement('nodeList').innerHTML = "Loading... please
wait...";
var url = layer_Major_Parks.getFullRequestString({
REQUEST: "GetFeatureInfo",
EXCEPTIONS: "application/vnd.ogc.se_xml",
BBOX: map.getExtent().toBBOX(),
X: e.xy.x,
Y: e.xy.y,
INFO_FORMAT: 'text/html',
QUERY_LAYERS: layer_Major_Parks.params.LAYERS,
WIDTH: map.size.w,
HEIGHT: map.size.h});
//put in an alert for debugging
OpenLayers.loadURL(url, '', this, setHTML);
OpenLayers.Event.stop(e);
});
//function to set the HTML
function setHTML(response) {
new OpenLayers.Util.getElement('nodeList').innerHTML = response.responseText;
}
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users