mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-07-23 00:34:55 +00:00
make all WMS request keys uppercase, close #1751
This commit is contained in:
@ -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('&');
|
||||
},
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user