diff --git a/examples/js/plugins/COGParser.js b/examples/js/plugins/COGParser.js index 612598f549..f8d1294c9e 100644 --- a/examples/js/plugins/COGParser.js +++ b/examples/js/plugins/COGParser.js @@ -235,7 +235,7 @@ const COGParser = (function _() { */ parse: async function _(data, options) { const source = options.in; - const tileExtent = options.extent.as(source.crs); + const tileExtent = options.extent.isExtent ? options.extent.as(source.crs) : options.extent.toExtent(source.crs); const level = selectLevel(source, tileExtent, source.tileWidth, source.tileHeight); const viewport = makeWindowFromExtent(source, tileExtent, level.resolution);