Replaces map.tests.js with new tests

Transforms the old rendering test for the Map
to the new rendering test approach.
This commit is contained in:
Kai Volland
2019-03-14 12:05:43 +01:00
parent de0f5d44a3
commit 595b74d04e
5 changed files with 55 additions and 74 deletions

View File

@@ -0,0 +1,28 @@
import Feature from '../../../src/ol/Feature.js';
import Point from '../../../src/ol/geom/Point.js';
import Map from '../../../src/ol/Map.js';
import View from '../../../src/ol/View.js';
import VectorLayer from '../../../src/ol/layer/Vector.js';
import VectorSource from '../../../src/ol/source/Vector.js';
const map = new Map({
pixelRatio: 1,
target: 'map',
layers: [
new VectorLayer({
source: new VectorSource({
features: [new Feature({
geometry: new Point([0, 0])
})]
})
})
],
view: new View({
projection: 'EPSG:4326',
center: [0, 0],
resolution: 1
})
});
map.getView().setCenter([10, 10]);
render();