I saw that OpenLayers.ProxyHost catch all requests globally.

I adopted this strategy to activate it just when WMSGetFeatureInfo is needed:


<code>

function toggleControl(element) {
    for(key in mapControls) {
var control = mapControls[key];
//alert ($(element).is('.ui-state-active'));
if(element.name == key && $(element).is('.ui-state-active')) {
    control.activate();
} else {
    control.deactivate();
}
    
    if ( element.name == 'wmsgetfeatinfo' )
        {
            OpenLayers.ProxyHost = "http://"+ webgis_hostname + webgis_port 
+"/"+ url_prefix + "/proxy/?url=";
            
        }
    
    else   {  OpenLayers.ProxyHost = ''  }
    
    }
}

</code>

sorry for "if" statements but it was a patch during production setup.

How could We declare OpenLayers.Control.WMSGetFeatureInfo and reserve Proxy 
just for featureinfo http request ?

I'd prefer reduce main webserver load.
Thanks in advance
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to