From cc59240c92eb57f96683b649b51fc578c12fae7a Mon Sep 17 00:00:00 2001 From: Igor Octaviano Date: Wed, 11 Dec 2024 09:19:43 -0300 Subject: [PATCH] Add logs --- src/pyramid.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pyramid.js b/src/pyramid.js index 36218c1d..a1325642 100644 --- a/src/pyramid.js +++ b/src/pyramid.js @@ -213,11 +213,13 @@ function _computeImagePyramid ({ metadata }) { * Round is conditional to avoid openlayers resolutions error. * The resolutions array should be composed of unique values in descending order. */ - zoomFactor = pyramidResolutions.includes(roundedZoomFactor) - ? zoomFactor.toFixed(3) - : roundedZoomFactor + if (pyramidResolutions.includes(roundedZoomFactor)) { + console.warn('resolution conflict rounding zoom factor (baseTotalPixelMatrixColumns / totalPixelMatrixColumns): ', zoomFactor) + zoomFactor = parseFloat(zoomFactor.toFixed(2)) + } else { + zoomFactor = roundedZoomFactor + } pyramidResolutions.push(zoomFactor) - pyramidOrigins.push(offset) } pyramidResolutions.reverse()