Add rendering test for vector tile layer rotation w/ layer on top

This commit is contained in:
Florent gravin
2018-11-15 16:41:06 +01:00
parent 7630fafcf2
commit f9c64e52af
9 changed files with 78 additions and 53 deletions

View File

@@ -1,12 +1,8 @@
import Feature from '../../../../src/ol/Feature.js';
import Map from '../../../../src/ol/Map.js';
import View from '../../../../src/ol/View.js';
import MVT from '../../../../src/ol/format/MVT.js';
import Point from '../../../../src/ol/geom/Point.js';
import VectorLayer from '../../../../src/ol/layer/Vector.js';
import VectorTileLayer from '../../../../src/ol/layer/VectorTile.js';
import {assign} from '../../../../src/ol/obj.js';
import VectorSource from '../../../../src/ol/source/Vector.js';
import VectorTileSource from '../../../../src/ol/source/VectorTile.js';
import CircleStyle from '../../../../src/ol/style/Circle.js';
import Fill from '../../../../src/ol/style/Fill.js';
@@ -76,32 +72,6 @@ describe('ol.rendering.layer.VectorTile', function() {
});
});
it('renders rotated view correctly with vector layer on top', function(done) {
createMap();
const vectorSource = new VectorSource({
features: [
new Feature(new Point([1825727.7316762917, 6143091.089223046]))
]
});
map.addLayer(new VectorLayer({
zIndex: 1,
source: vectorSource,
style: new Style({
image: new CircleStyle({
radius: 10,
fill: new Fill({
color: 'red'
})
})
})
}));
map.getView().setRotation(Math.PI / 4);
waitForTiles(source, {}, function() {
expectResemble(map, 'rendering/ol/layer/expected/vectortile-vector-rotated.png',
14, done);
});
});
it('renders correctly with the canvas renderer (HiDPI)', function(done) {
createMap(2);
waitForTiles(source, {}, function() {