From bf490ed723ed0c37518ffae2d66609c0b8333e65 Mon Sep 17 00:00:00 2001 From: Anton Steketee Date: Thu, 15 Dec 2022 04:41:52 +0000 Subject: [PATCH] fix(geotiff.js): pass the options object to the GeoTIFF.from*() builders --- src/geotiff.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/geotiff.js b/src/geotiff.js index 17349a41..a6cb7987 100644 --- a/src/geotiff.js +++ b/src/geotiff.js @@ -682,7 +682,7 @@ export { MultiGeoTIFF }; * @returns {Promise} The resulting GeoTIFF file. */ export async function fromUrl(url, options = {}, signal) { - return GeoTIFF.fromSource(makeRemoteSource(url, options), signal); + return GeoTIFF.fromSource(makeRemoteSource(url, options), options, signal); } /** @@ -695,7 +695,7 @@ export async function fromUrl(url, options = {}, signal) { * @returns {Promise} The resulting GeoTIFF file. */ export async function fromCustomClient(client, options = {}, signal) { - return GeoTIFF.fromSource(makeCustomSource(client, options), signal); + return GeoTIFF.fromSource(makeCustomSource(client, options), options, signal); } /** @@ -707,7 +707,7 @@ export async function fromCustomClient(client, options = {}, signal) { * @returns {Promise} The resulting GeoTIFF file. */ export async function fromArrayBuffer(arrayBuffer, signal) { - return GeoTIFF.fromSource(makeBufferSource(arrayBuffer), signal); + return GeoTIFF.fromSource(makeBufferSource(arrayBuffer), {}, signal); } /** @@ -723,7 +723,7 @@ export async function fromArrayBuffer(arrayBuffer, signal) { * @returns {Promise} The resulting GeoTIFF file. */ export async function fromFile(path, signal) { - return GeoTIFF.fromSource(makeFileSource(path), signal); + return GeoTIFF.fromSource(makeFileSource(path), {}, signal); } /** @@ -737,7 +737,7 @@ export async function fromFile(path, signal) { * @returns {Promise} The resulting GeoTIFF file. */ export async function fromBlob(blob, signal) { - return GeoTIFF.fromSource(makeFileReaderSource(blob), signal); + return GeoTIFF.fromSource(makeFileReaderSource(blob), {}, signal); } /** @@ -752,9 +752,9 @@ export async function fromBlob(blob, signal) { * @returns {Promise} The resulting MultiGeoTIFF file. */ export async function fromUrls(mainUrl, overviewUrls = [], options = {}, signal) { - const mainFile = await GeoTIFF.fromSource(makeRemoteSource(mainUrl, options), signal); + const mainFile = await GeoTIFF.fromSource(makeRemoteSource(mainUrl), options, signal); const overviewFiles = await Promise.all( - overviewUrls.map((url) => GeoTIFF.fromSource(makeRemoteSource(url, options))), + overviewUrls.map((url) => GeoTIFF.fromSource(makeRemoteSource(url), options, signal)), ); return new MultiGeoTIFF(mainFile, overviewFiles);