From 0a2697c4b6a273b2151defce051d24cee7b335eb Mon Sep 17 00:00:00 2001 From: Brian Hatchl Date: Fri, 19 Oct 2012 13:57:18 -0400 Subject: [PATCH] fixed bug where wms tilesize option was ignored when setting wms params width and height --- src/layer/tile/TileLayer.WMS.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layer/tile/TileLayer.WMS.js b/src/layer/tile/TileLayer.WMS.js index c624a213..aab08bbe 100644 --- a/src/layer/tile/TileLayer.WMS.js +++ b/src/layer/tile/TileLayer.WMS.js @@ -17,9 +17,9 @@ L.TileLayer.WMS = L.TileLayer.extend({ var wmsParams = L.Util.extend({}, this.defaultWmsParams); 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 { - wmsParams.width = wmsParams.height = this.options.tileSize; + wmsParams.width = wmsParams.height = (options.tileSize) ? options.tileSize : this.options.tileSize; } for (var i in options) {