Skip to content

Commit

Permalink
example(COG): Set maxSubdivisionLevel to 10 (default is 5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin ETOURNEAU authored and Desplandis committed May 30, 2024
1 parent 24ab82f commit 1de7124
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions examples/source_file_cog.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,22 @@
readCOGURL();
}

function loadCOG(url, crs) {
function loadCOG(url) {
// create a source from a Cloud Optimized GeoTiff
var cogSource = new COGSource({
url: url,
crs: "EPSG:2154"
crs: "EPSG:2154",
// Default resample method is 'nearest', 'bilinear' looks better when zoomed
resampleMethod: 'bilinear'
});

cogSource.whenReady.then(() => {
var view = new itowns.PlanarView(viewerDiv, cogSource.extent, { disableSkirt: true, placement: { tilt: 90 } });
var view = new itowns.PlanarView(viewerDiv, cogSource.extent, {
// Default maxSubdivisionLevel is 5, so with huge geotiff it's not enough to see details when zoomed
maxSubdivisionLevel: 10,
disableSkirt: true,
placement: { tilt: 90 }
});
setupLoadingScreen(viewerDiv, view);
new itowns.PlanarControls(view, {});
var cogLayer = new itowns.ColorLayer('cog', {
Expand Down

0 comments on commit 1de7124

Please sign in to comment.