Add rendering test
This commit is contained in:
BIN
test/rendering/cases/layer-tile-stack-opacity/expected.png
Normal file
BIN
test/rendering/cases/layer-tile-stack-opacity/expected.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
47
test/rendering/cases/layer-tile-stack-opacity/main.js
Normal file
47
test/rendering/cases/layer-tile-stack-opacity/main.js
Normal file
@@ -0,0 +1,47 @@
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import TileLayer from '../../../../src/ol/layer/Tile.js';
|
||||
import View from '../../../../src/ol/View.js';
|
||||
import XYZ from '../../../../src/ol/source/XYZ.js';
|
||||
import {fromLonLat} from '../../../../src/ol/proj.js';
|
||||
|
||||
const center = fromLonLat([-80.4, 32.49]);
|
||||
|
||||
const layer1 = new TileLayer({
|
||||
source: new XYZ({
|
||||
url: '/data/tiles/south-carolina/{z}/{x}/1-{y}.png',
|
||||
transition: 0,
|
||||
}),
|
||||
});
|
||||
const layer2 = new TileLayer({
|
||||
source: new XYZ({
|
||||
url: '/data/tiles/south-carolina/{z}/{x}/2-{y}.png',
|
||||
transition: 0,
|
||||
}),
|
||||
opacity: 0.5,
|
||||
});
|
||||
const layer3 = new TileLayer({
|
||||
source: new XYZ({
|
||||
url: '/data/tiles/south-carolina/{z}/{x}/3-{y}.png',
|
||||
transition: 0,
|
||||
}),
|
||||
opacity: 0.5,
|
||||
});
|
||||
const layer4 = new TileLayer({
|
||||
source: new XYZ({
|
||||
url: '/data/tiles/south-carolina/{z}/{x}/4-{y}.png',
|
||||
transition: 0,
|
||||
}),
|
||||
opacity: 0.5,
|
||||
});
|
||||
|
||||
new Map({
|
||||
pixelRatio: 1,
|
||||
layers: [layer1, layer2, layer3, layer4],
|
||||
target: 'map',
|
||||
view: new View({
|
||||
center: center,
|
||||
zoom: 11.4,
|
||||
}),
|
||||
});
|
||||
|
||||
render();
|
||||
BIN
test/rendering/data/tiles/south-carolina/11/566/1-828.png
Normal file
BIN
test/rendering/data/tiles/south-carolina/11/566/1-828.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
test/rendering/data/tiles/south-carolina/11/566/2-828.png
Normal file
BIN
test/rendering/data/tiles/south-carolina/11/566/2-828.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
BIN
test/rendering/data/tiles/south-carolina/11/566/3-828.png
Normal file
BIN
test/rendering/data/tiles/south-carolina/11/566/3-828.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.9 KiB |
BIN
test/rendering/data/tiles/south-carolina/11/566/4-828.png
Normal file
BIN
test/rendering/data/tiles/south-carolina/11/566/4-828.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.2 KiB |
Reference in New Issue
Block a user