[OpenLayers-Users] Re: WMSGetFeatureInfo popups

adimopoulos dimoaris at gmail.com
Tue Oct 18 03:05:43 EDT 2011


If I understand correctly the layer you are requesting info from is served by
your local geoserver. Then there is no need for setting a proxy. You just
need to add something like  

info = new OpenLayers.Control.WMSGetFeatureInfo({
            url: 'your URL ', 
            title: 'Identify features by clicking',
            queryVisible: true,
            eventListeners: {
                getfeatureinfo: function(event) {
                    map.addPopup(new OpenLayers.Popup.FramedCloud(
                        "chicken", 
                        map.getLonLatFromPixel(event.xy),
                        null,
                        event.text,
                        null,
                        true
                    ));
                }
            }
        });
        map.addControl(info);
        info.activate(); 

Hope this helped

Aris

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/WMSGetFeatureInfo-popups-tp6897072p6903500.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list