Add rendering test for layer tile simple

This commit is contained in:
Florent gravin
2018-11-14 15:08:43 +01:00
parent fc85b2ba78
commit 081c677ea2
3 changed files with 25 additions and 28 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

View File

@@ -0,0 +1,25 @@
import Map from '../../../src/ol/CompositeMap.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
})
})
],
target: 'map',
view: new View({
center: center,
zoom: 3
})
});
render();

View File

@@ -73,34 +73,6 @@ describe('ol.rendering.layer.Tile', function() {
});
}
describe('single tile layer', function() {
let source;
beforeEach(function() {
source = new XYZ({
url: 'rendering/ol/data/tiles/osm/{z}/{x}/{y}.png',
transition: 0
});
});
it('tests the canvas renderer', function(done) {
createMap('canvas');
waitForTiles('canvas', [source], {}, function() {
expectResemble(map, 'rendering/ol/layer/expected/osm-canvas.png',
IMAGE_TOLERANCE, done);
});
});
where('WebGL').it('tests the WebGL renderer', function(done) {
assertWebGL();
createMap('webgl');
waitForTiles('webgl', [source], {}, function() {
expectResemble(map, 'rendering/ol/layer/expected/osm-webgl.png',
IMAGE_TOLERANCE, done);
});
});
});
describe('two tile layers', function() {
let source1, source2;