/*
OLCpatches[OLCpatches.length] = ["OpenLayers.Layer.WMS.prototype.getFullRequestString ", "patch_WMS.js"];
OpenLayers.Layer.WMS.prototype.getFullRequestString = function(newParams,altUrl)
{
    try{
        var projectionCode=typeof this.options.projection == 'undefined' ? this.map.getProjection() : this.options.projection;
    }catch(err){
        var projectionCode=this.map.getProjection();
    }
    this.params.SRS = projectionCode=="none" ? null : projectionCode;

    return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);
}
*/

OLCpatches[OLCpatches.length] = ["OpenLayers.Layer.WMS.prototype.getFullRequestString ", "patch_WMS.js"];
OpenLayers.Layer.WMS.prototype.getFullRequestString = function(newParams,altUrl)
{
    try{
        var projectionCode=typeof this.options.projection == 'undefined' ? this.map.getProjection() : this.options.projection;
    }catch(err){
        var projectionCode=this.map.getProjection();
    }

    var value = (projectionCode == "none") ? null : projectionCode
    if (parseFloat(this.params.VERSION) >= 1.3) {
        this.params.CRS = value;
    } else {
        this.params.SRS = value;
    }

    if(this.options.wms_zoom == true)
        this.params.ZOOM = map.getZoom();
    if(this.options.wms_resolution == true)
        this.params.RESOLUTION = map.getResolution();

    return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this, arguments);
}

