make all WMS request keys uppercase, close #1751

This commit is contained in:
Vladimir Agafonkin
2013-06-11 16:42:35 +03:00
parent c807d10a02
commit e5965aaa22
2 changed files with 3 additions and 3 deletions

View File

@ -97,10 +97,10 @@ L.Util = {
return obj.options;
},
getParamString: function (obj, existingUrl) {
getParamString: function (obj, existingUrl, uppercase) {
var params = [];
for (var i in obj) {
params.push(encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]));
params.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i]));
}
return ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&');
},

View File

@ -63,7 +63,7 @@ L.TileLayer.WMS = L.TileLayer.extend({
url = L.Util.template(this._url, {s: this._getSubdomain(tilePoint)});
return url + L.Util.getParamString(this.wmsParams, url) + '&bbox=' + bbox;
return url + L.Util.getParamString(this.wmsParams, url, true) + '&BBOX=' + bbox;
},
setParams: function (params, noRedraw) {