[OpenLayers-Users] Newbie questions

pablo lopez plablo09 at gmail.com
Fri Feb 26 10:20:43 EST 2010


Hi Joe, I think something like this shoul do it:

       info = new OpenLayers.Control.
WMSGetFeatureInfo({
           url: 'http://tobagoborn.com:8080/geoserver/wms',
           title: 'Identify features by clicking',
           layers: [layer1, layer2,...],  <---Here you provide an array of
layer objects. These are the layers you are querying
           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();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100226/860039a0/attachment.html


More information about the Users mailing list