[OpenLayers-Users] Problem with WMSGetFeatureInfo

Frederick Löbig frederick.loebig at live.de
Tue Jan 10 09:18:04 EST 2012


Hi all,

I have a problem identifying Objects on my OpenLayers map. I have added the control-definition for the WMSGetFeatureInfo 'control' and activated it, but somehow, nothing happens when I click on anything. For debugging, I have implemented an alert() call, but no popup shows up so I know it's not a problem with coordinates or something, but a fundamental problem. Please find the relevent parts of the code attached:

...
// Some code creating the map (it's working fine). layer definitions etc..
...

info = new OpenLayers.Control.WMSGetFeatureInfo({
            url: 'http://10.49.5.80:8080/geoserver/wms', 
            title: 'Identify features by clicking',
            queryVisible: false,
            eventListeners: {
                getfeatureinfo: function(event) {
                    map.addPopup(new OpenLayers.Popup.FramedCloud(
                        "mypopup", 
                        map.getLonLatFromPixel(event.xy),
                        null,
                        event.text,
                        null,
                        true
                    ));
                }
            }
        });

map.addControl(info);

...
// other control definitions
...

info.activate();

...
// rest of the init() code such as zoomToMaxExtent and so on...
...

Any ideas?

Cheers,
Freddy



B.Eng. Frederick Löbig
Röderichstraße 59
60489 Frankfurt am Main
---
E:: Frederick.Loebig at grunsnid.de
P: +49 (0) 69 - 78 99 52 41
M: +49 (0) 174 - 70 89 296
---
Office:
euNetworks GmbH
Ludwig-Landmann-Straße 40560486 Frankfurt am MainP: +49 (0) 69 - 90 554 - 534
E: Frederick.Loebig at eunetworks.com
S: floebig

This email and any attachments may contain confidential and/or legally privileged information. If you are not the intended recipient, please delete the email without reading it and notify the sender. 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120110/664ab36a/attachment.html


More information about the Users mailing list