Hi,
 
I have a WMSGetFeatureInfo control and would like to send an additional post 
parameter when it is executed - how could I do that?
What I have below does not send the   'WEEDSQL' parameter which I have in my 
layer with the WMSGetFeatureInfo request
 
Thus I get an error in my PostGIS layer because the data statement for 
MapServer is incomplete..
 
 
//the query layer 
        var observations = new OpenLayers.Layer.WMS(
                        "Observations",
                        
"/cgi-bin/mapserv564agg?map=/var/www/mapdata/projects/calipc/ca_base_v2.map",
                        {layers: 'observations', 'transparent': true, 
'PHPSESSID':'<?php print session_id() ?>', 'WEEDSQL':'1 = 0'},
                        {isBaseLayer:false, opacity:0, visibility:true, 
singleTile:true, displayInLayerSwitcher:false }
                    );
 
...
 // the id control
        var info = new OpenLayers.Control.WMSGetFeatureInfo({
            url: 
'/cgi-bin/mapserv564agg?map=/var/www/mapdata/projects/calipc/ca_base_v2.map',
            title: 'Identify features by clicking',
            queryVisible: true,
            layers: [observations],
            WEEDSQL: "species_id = 1",
            eventListeners: {
                getfeatureinfo: function(event) {
                    var obquerystring1 = "species_id = 1";
                    observations.mergeNewParams({'WEEDSQL':obquerystring1});    
                
                    map.addPopup(new OpenLayers.Popup.FramedCloud(
                        "manzana",
                        map.getLonLatFromPixel(event.xy),
                        null,
                        event.text,
                        null,
                        true
                    ));
                }
            }
        });
        map.addControl(info);
        info.activate();
 
How can I send the WEEDSQL parameter that is included in my layer above with 
the getfatureinfo request ?

Thanks
Karsten 

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to