Skip to content

Commit

Permalink
fixed issue where checkIfYCbCr wouldn't resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielJDufour committed Mar 9, 2022
1 parent 500bfa8 commit 9fa33cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/georaster-layer-for-leaflet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ const GeoRasterLayer: (new (options: GeoRasterLayerOptions) => any) & typeof L.C
};
}
}
return resolve(true);
});
} catch (error) {
console.error("ERROR initializing GeoTIFFLayer", error);
Expand Down Expand Up @@ -401,6 +402,7 @@ const GeoRasterLayer: (new (options: GeoRasterLayerOptions) => any) & typeof L.C
maxSamplesDown = Math.ceil(resolution * (recropTile.height / extentOfTileInMapCRS.height));
}
}

const overdrawTileAcross = rasterPixelsAcross < maxSamplesAcross;
const overdrawTileDown = rasterPixelsDown < maxSamplesDown;
const numberOfSamplesAcross = overdrawTileAcross ? snappedSamplesAcross : maxSamplesAcross;
Expand Down Expand Up @@ -501,6 +503,7 @@ const GeoRasterLayer: (new (options: GeoRasterLayerOptions) => any) & typeof L.C
tile.width = canvasWidth;
tile.style.width = canvasWidth + "px";
if (debugLevel >= 3) console.log("setting tile height to " + canvasHeight + "px");
if (debugLevel >= 3) console.log("setting tile width to " + canvasWidth + "px");

// set how large to display each sample in screen pixels
const heightOfSampleInScreenPixels = innerTileHeight / numberOfSamplesDown;
Expand Down

0 comments on commit 9fa33cf

Please sign in to comment.