Dear All,

I run OpenLayers on Geoserver and I have some features which i would like the 
user to click on and get information, say GetFeatureInfo. I have tried a few 
help but they don't seem to help me (see the code below) - I only see a blank 
space, no result.  I am new to these things, don't know what is wrong but I 
need 
to get something done here. Can somebody please tell me what is wrong? I work 
on 
my university server but Geoserver is installed on my local machine, not over 
the server. Does that have anything to do with my result.

Somebody please help. The result can be wrapped in a popup textbox or somewhere 
on the map window. A step-by-step guide will be very much appreciated because i 
don't even know if i need to add something before this code or after it. Thanks 
a million!! 



    //Code used to support GetFeatureInfo request

                map.events.register('click', map, function (e) {
                    document.getElementById('nodelist').innerHTML = "Loading... 
please wait...";
                    var params = {
                        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: map.layers[0].params.LAYERS,
                        FEATURE_COUNT: 50,
                        Layers: 'thesis:SLChiefdoms_adm3',
                        Styles: '',
                        Srs: 'EPSG:32628',
                        WIDTH: map.size.w,
                        HEIGHT: map.size.h,
                        format: format};
                    OpenLayers.loadURL("http://localhost:8090/geoserver/wms";, 
params, this, setHTML, setHTML);
                    OpenLayers.Event.stop(e);
                });
            }

            // sets the HTML provided into the nodelist element
            function setHTML(response){
                document.getElementById('nodelist').innerHTML = 
response.responseText;
            };



      
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to