Fix eslint errors
This commit is contained in:
@@ -147,7 +147,7 @@ ol.source.WMTS = function(options) {
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
var tileUrlFunction = (urls && urls.length > 0) ?
|
var tileUrlFunction = (urls && urls.length > 0) ?
|
||||||
ol.TileUrlFunction.createFromTileUrlFunctions(
|
ol.TileUrlFunction.createFromTileUrlFunctions(
|
||||||
@@ -185,8 +185,8 @@ ol.source.WMTS.prototype.setUrls = function(urls) {
|
|||||||
this.urls = urls;
|
this.urls = urls;
|
||||||
var key = urls.join('\n');
|
var key = urls.join('\n');
|
||||||
this.setTileUrlFunction(this.fixedTileUrlFunction ?
|
this.setTileUrlFunction(this.fixedTileUrlFunction ?
|
||||||
this.fixedTileUrlFunction.bind(this) :
|
this.fixedTileUrlFunction.bind(this) :
|
||||||
ol.TileUrlFunction.createFromTileUrlFunctions(urls.map(this.createFromWMTSTemplate_.bind(this))), key);
|
ol.TileUrlFunction.createFromTileUrlFunctions(urls.map(this.createFromWMTSTemplate_.bind(this))), key);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ describe('ol.source.WMTS', function() {
|
|||||||
'http://2.example.com/{TileMatrix}/{TileRow}/{TileCol}.jpeg'
|
'http://2.example.com/{TileMatrix}/{TileRow}/{TileCol}.jpeg'
|
||||||
],
|
],
|
||||||
tileGrid: new ol.tilegrid.WMTS({
|
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],
|
origin: [2690000, 1285000],
|
||||||
resolutions: [4000, 3750, 3500, 3250, 3000, 2750, 2500, 2250]
|
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'
|
'https://b.example.com/{TileMatrix}/{TileRow}/{TileCol}.jpg'
|
||||||
];
|
];
|
||||||
source.setUrls(urls);
|
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/);
|
expect(tileUrl1).to.match(/https\:\/\/[ab]\.example\.com\/2\/-5\/9\.jpg/);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user