minor WMS cleanup after merge

This commit is contained in:
Vladimir Agafonkin 2013-02-20 19:46:56 +02:00
parent 3063fd9192
commit 36e59c2afb

View File

@ -18,12 +18,13 @@ L.TileLayer.WMS = L.TileLayer.extend({
this._url = url;
var wmsParams = L.extend({}, this.defaultWmsParams);
var wmsParams = L.extend({}, this.defaultWmsParams),
tileSize = options.tileSize || this.options.tileSize;
if (options.detectRetina && L.Browser.retina) {
wmsParams.width = wmsParams.height = ((options.tileSize) ? options.tileSize : this.options.tileSize) * 2;
wmsParams.width = wmsParams.height = tileSize * 2;
} else {
wmsParams.width = wmsParams.height = (options.tileSize) ? options.tileSize : this.options.tileSize;
wmsParams.width = wmsParams.height = tileSize;
}
for (var i in options) {