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:
Kai Volland
2019-03-18 16:39:37 +01:00
parent fc878fd539
commit ac3a2d960a
8 changed files with 91 additions and 138 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

View 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();