[OpenLayers-Users] Add extra parameters to getfeatureinfo
request
Eric Lemoine
eric.lemoine at camptocamp.com
Fri Aug 14 12:29:21 EDT 2009
On Fri, Aug 14, 2009 at 4:41 PM, Raul David Orozco<hagen1113 at yahoo.com> wrote:
> Hi to everyone. I'm using this piece of code to make a getfeatureinfo
> request:
> info = new OpenLayers.Control.WMSGetFeatureInfo({
> url: 'dir/smms/wms.php',
> title: 'Identify features by clicking',
> queryVisible: true,
> eventListeners: {
> getfeatureinfo: function(event) {
> map.addPopup(new OpenLayers.Popup.FramedCloud(
> "myagri",
> map.getLonLatFromPixel(event.xy),
> null,
> event.text,
> null,
> true
> ));
> }
> }
> });
> map.addControl(info);
> info.activate();
> And it works fine, I get my info back as I need it, but I have to send some
> extra parameters with getfeatureinfo request for example ''REPORT":"YES" but
> I don't know how to do it. Any help will be appreciated, and if everyone can
> suggest me a better way to do the features request that would be great.
Add
vendorParams: {
"REPORT": "YES"
}
in the options passed to the control.
Cheers,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
More information about the Users
mailing list