[OpenLayers-Users] Need help with getfeatureinfo

Andreas Hocevar ahocevar at opengeo.org
Thu Sep 3 17:00:59 EDT 2009


Hi,

Raul David Orozco wrote:
> Hi, I've dealing with a problem that I can't solve, I just need to add
> extra parameters to a getfeaturinfo request, for example color:
> 'yellow', and I need that parameters to be sent with the request. The
> code I´m using for the request is below:
>  
> info = new OpenLayers.Control.WMSGetFeatureInfo({
>             url: 'dir/smms/wms.php',

            vendorParams: {
                color: 'yellow'
            }

>             title: 'Identify features by clicking',
>    other: 'eso',
>             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();
>  
> Thanx for your help, and long life to OL.

Use the vendorParams property.

Regards,
Andreas.

>
> ------------------------------------------------------------------------
>
> ¡Obtén la mejor experiencia en la web!
> Descarga gratis el nuevo Internet Explorer 8
> http://downloads.yahoo.com/ieak8/?l=e1
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>   


-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.




More information about the Users mailing list