Replaces reproj image.tests.js and tile.tests.js

Transforms the old rendering tests for
ReprojImage and ReprojTile to the new
rendering test approach.
This commit is contained in:
Kai Volland
2019-03-25 14:13:14 +01:00
parent 7c1df60d06
commit c9939d2bff
29 changed files with 264 additions and 246 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,29 @@
import Map from '../../../src/ol/Map.js';
import View from '../../../src/ol/View.js';
import Static from '../../../src/ol/source/ImageStatic.js';
import {
get as getProjection,
transformExtent
} from '../../../src/ol/proj';
import ImageLayer from '../../../src/ol/layer/Image.js';
const source = new Static({
url: '/data/tiles/osm/5/5/12.png',
imageExtent: transformExtent([-123, 37, -122, 38], 'EPSG:4326', 'EPSG:3857'),
projection: getProjection('EPSG:3857')
});
new Map({
pixelRatio: 1,
target: 'map',
layers: [new ImageLayer({
source: source
})],
view: new View({
center: [-122.416667, 37.783333],
zoom: 8,
projection: 'EPSG:4326'
})
});
render();