Hi all,

I am having a real bad time getting features from a WMSGetFeatureInfo and load
it with OpenLayers.loadURL to display it at the bottom of my document. The
WMSGetFeatureInfo works without a problem but when I insert it into the loadURL
it seems to hand over an object instead of a string. The code is as follows:

var WMSGetFeatureInfo = new OpenLayers.Control.WMSGetFeatureInfo(
        {url:  "http://localhost:8080/geoserver/wms?";,
        infoFormat: 'text/html',
        eventListeners: {
            getfeatureinfo: event
                }
        });
        
        function event(){ 
                OpenLayers.loadURL(WMSGetFeatureInfo,'',this,setHTML);
                };

        function setHTML(response){
                alert(response.responseText);
                };

The WMSGetFeatureInfo returns:
http://localhost:8080/geoserver/wms?&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=MasterThesis%3Aincidence_occurences,MasterThesis%3Acamps_poly&QUERY_LAYERS=MasterThesis%3Aincidence_occurences,MasterThesis%3Acamps_poly&STYLES=,&BBOX=18.452148%2C9.220703%2C31.547852%2C16.779297&FEATURE_COUNT=10&HEIGHT=344&WIDTH=596&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fplain&SRS=EPSG%3A4326&X=283&Y=111

So far so good, but when it comes to Openlayers.loadURL I only get:
http://localhost:8080/geoserver/www/MasterThesis/%5Bobject%20Object%5D

Can anyone help me out what the problem might be. Alternatively, what is the
easiest way to use the response of a OpenLayers.Control.WMSGetFeatureInfo to
display it?

Thank you very much for any assistance.

Best regards, Arne 


------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to