diff --git a/src/ol/source/wmts.js b/src/ol/source/wmts.js index 1513f5f34a..2f7b8cc4a2 100644 --- a/src/ol/source/wmts.js +++ b/src/ol/source/wmts.js @@ -147,7 +147,7 @@ ol.source.WMTS = function(options) { return url; } }); - } + }; var tileUrlFunction = (urls && urls.length > 0) ? ol.TileUrlFunction.createFromTileUrlFunctions( @@ -185,8 +185,8 @@ ol.source.WMTS.prototype.setUrls = function(urls) { this.urls = urls; var key = urls.join('\n'); this.setTileUrlFunction(this.fixedTileUrlFunction ? - this.fixedTileUrlFunction.bind(this) : - ol.TileUrlFunction.createFromTileUrlFunctions(urls.map(this.createFromWMTSTemplate_.bind(this))), key); + this.fixedTileUrlFunction.bind(this) : + ol.TileUrlFunction.createFromTileUrlFunctions(urls.map(this.createFromWMTSTemplate_.bind(this))), key); }; /** diff --git a/test/spec/ol/source/wmts.test.js b/test/spec/ol/source/wmts.test.js index 68155bb733..1778705a20 100644 --- a/test/spec/ol/source/wmts.test.js +++ b/test/spec/ol/source/wmts.test.js @@ -267,7 +267,7 @@ describe('ol.source.WMTS', function() { 'http://2.example.com/{TileMatrix}/{TileRow}/{TileCol}.jpeg' ], tileGrid: new ol.tilegrid.WMTS({ - matrixIds: [0,1,2,3,4,5,6,7], + matrixIds: [0, 1, 2, 3, 4, 5, 6, 7], origin: [2690000, 1285000], resolutions: [4000, 3750, 3500, 3250, 3000, 2750, 2500, 2250] }) @@ -278,7 +278,7 @@ describe('ol.source.WMTS', function() { 'https://b.example.com/{TileMatrix}/{TileRow}/{TileCol}.jpg' ]; source.setUrls(urls); - var tileUrl1 = source.tileUrlFunction([2,9,4],1,projection); + var tileUrl1 = source.tileUrlFunction([2, 9, 4], 1, projection); expect(tileUrl1).to.match(/https\:\/\/[ab]\.example\.com\/2\/-5\/9\.jpg/); }); });