Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1de7124

Browse files
ketourneauDesplandis
authored andcommitted
example(COG): Set maxSubdivisionLevel to 10 (default is 5)
1 parent 24ab82f commit 1de7124

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

examples/source_file_cog.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,22 @@
5656
readCOGURL();
5757
}
5858

59-
function loadCOG(url, crs) {
59+
function loadCOG(url) {
6060
// create a source from a Cloud Optimized GeoTiff
6161
var cogSource = new COGSource({
6262
url: url,
63-
crs: "EPSG:2154"
63+
crs: "EPSG:2154",
64+
// Default resample method is 'nearest', 'bilinear' looks better when zoomed
65+
resampleMethod: 'bilinear'
6466
});
6567

6668
cogSource.whenReady.then(() => {
67-
var view = new itowns.PlanarView(viewerDiv, cogSource.extent, { disableSkirt: true, placement: { tilt: 90 } });
69+
var view = new itowns.PlanarView(viewerDiv, cogSource.extent, {
70+
// Default maxSubdivisionLevel is 5, so with huge geotiff it's not enough to see details when zoomed
71+
maxSubdivisionLevel: 10,
72+
disableSkirt: true,
73+
placement: { tilt: 90 }
74+
});
6875
setupLoadingScreen(viewerDiv, view);
6976
new itowns.PlanarControls(view, {});
7077
var cogLayer = new itowns.ColorLayer('cog', {

0 commit comments

Comments
 (0)