Replaces tile.tests.js (partially) with new tests
Transforms the old rendering tests for the TileLayer to the new rendering test approach. The render-listener test is kept in the old format for know.
This commit is contained in:
BIN
rendering/cases/layer-tile-opacity/expected.png
Normal file
BIN
rendering/cases/layer-tile-opacity/expected.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 71 KiB |
26
rendering/cases/layer-tile-opacity/main.js
Normal file
26
rendering/cases/layer-tile-opacity/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 {fromLonLat} from '../../../src/ol/proj';
|
||||
import XYZ from '../../../src/ol/source/XYZ';
|
||||
|
||||
const center = fromLonLat([8.6, 50.1]);
|
||||
|
||||
new Map({
|
||||
layers: [
|
||||
new TileLayer({
|
||||
source: new XYZ({
|
||||
url: '/data/tiles/satellite/{z}/{x}/{y}.jpg',
|
||||
transition: 0
|
||||
}),
|
||||
opacity: 0.2
|
||||
})
|
||||
],
|
||||
target: 'map',
|
||||
view: new View({
|
||||
center: center,
|
||||
zoom: 3
|
||||
})
|
||||
});
|
||||
|
||||
render();
|
||||
Reference in New Issue
Block a user