Skip to content

Commit

Permalink
Add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
igoroctaviano committed Dec 11, 2024
1 parent 85b4146 commit cc59240
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/pyramid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit cc59240

Please sign in to comment.