fixed bug where wms tilesize option was ignored when setting

wms params width and height
This commit is contained in:
Brian Hatchl 2012-10-19 13:57:18 -04:00
parent 430092c48e
commit 0a2697c4b6

View File

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