adds TileMatrixSetLimits to WMTS format reader
enhance wmtstilegrid to use it when building matrixId and resolution arrays
This commit is contained in:
@@ -309,7 +309,7 @@ ol.source.WMTS.optionsFromCapabilities = function(wmtsCap, config) {
|
||||
ol.DEBUG && console.assert(l['TileMatrixSetLink'].length > 0,
|
||||
'layer has TileMatrixSetLink');
|
||||
var tileMatrixSets = wmtsCap['Contents']['TileMatrixSet'];
|
||||
var idx, matrixSet;
|
||||
var idx, matrixSet, matrixLimits;
|
||||
if (l['TileMatrixSetLink'].length > 1) {
|
||||
if ('projection' in config) {
|
||||
idx = ol.array.findIndex(l['TileMatrixSetLink'],
|
||||
@@ -340,6 +340,8 @@ ol.source.WMTS.optionsFromCapabilities = function(wmtsCap, config) {
|
||||
}
|
||||
matrixSet = /** @type {string} */
|
||||
(l['TileMatrixSetLink'][idx]['TileMatrixSet']);
|
||||
matrixLimits = /** @type {Array.<Object>} */
|
||||
(l['TileMatrixSetLink'][idx]['TileMatrixSetLimits']);
|
||||
|
||||
ol.DEBUG && console.assert(matrixSet, 'TileMatrixSet must not be null');
|
||||
|
||||
@@ -409,7 +411,7 @@ ol.source.WMTS.optionsFromCapabilities = function(wmtsCap, config) {
|
||||
}
|
||||
|
||||
var tileGrid = ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet(
|
||||
matrixSetObj, extent);
|
||||
matrixSetObj, extent, matrixLimits);
|
||||
|
||||
/** @type {!Array.<string>} */
|
||||
var urls = [];
|
||||
|
||||
Reference in New Issue
Block a user