Test renderer behavior for Zoomify zDirection
The zDirection addition to the Zoomify tile source only takes effect through the renderer, so these two renderer cases are added to test the behavior. zoomify-no-zdirection expects the default behavior. zoomify-zdirection expects the tiles for the next better resolution.
This commit is contained in:
BIN
rendering/cases/zoomify-no-zdirection/expected.png
Normal file
BIN
rendering/cases/zoomify-no-zdirection/expected.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 778 B |
25
rendering/cases/zoomify-no-zdirection/main.js
Normal file
25
rendering/cases/zoomify-no-zdirection/main.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import Map from '../../../src/ol/Map.js';
|
||||
import View from '../../../src/ol/View.js';
|
||||
import TileLayer from '../../../src/ol/layer/Tile.js';
|
||||
import Zoomify from '../../../src/ol/source/Zoomify.js';
|
||||
|
||||
const layer = new TileLayer({
|
||||
source: new Zoomify({
|
||||
url: '/data/tiles/zoomify/',
|
||||
size: [200, 200],
|
||||
tileSize: 100
|
||||
})
|
||||
});
|
||||
|
||||
new Map({
|
||||
layers: [layer],
|
||||
target: 'map',
|
||||
view: new View({
|
||||
resolutions: [2, 1],
|
||||
extent: [0, -200, 200, 0],
|
||||
center: [100, -100],
|
||||
zoom: 0.4
|
||||
})
|
||||
});
|
||||
|
||||
render();
|
||||
BIN
rendering/cases/zoomify-zdirection/expected.png
Normal file
BIN
rendering/cases/zoomify-zdirection/expected.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 801 B |
26
rendering/cases/zoomify-zdirection/main.js
Normal file
26
rendering/cases/zoomify-zdirection/main.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import Map from '../../../src/ol/Map.js';
|
||||
import View from '../../../src/ol/View.js';
|
||||
import TileLayer from '../../../src/ol/layer/Tile.js';
|
||||
import Zoomify from '../../../src/ol/source/Zoomify.js';
|
||||
|
||||
const layer = new TileLayer({
|
||||
source: new Zoomify({
|
||||
url: '/data/tiles/zoomify/',
|
||||
size: [200, 200],
|
||||
tileSize: 100,
|
||||
zDirection: -1
|
||||
})
|
||||
});
|
||||
|
||||
new Map({
|
||||
layers: [layer],
|
||||
target: 'map',
|
||||
view: new View({
|
||||
resolutions: [2, 1],
|
||||
extent: [0, -200, 200, 0],
|
||||
center: [100, -100],
|
||||
zoom: 0.4
|
||||
})
|
||||
});
|
||||
|
||||
render();
|
||||
Reference in New Issue
Block a user