Organize tests

This commit is contained in:
Tim Schaub
2021-04-27 15:41:14 -07:00
parent 278e355795
commit 490cfabe91
599 changed files with 12374 additions and 1603 deletions

View File

@@ -0,0 +1,58 @@
import Feature from '../../../../src/ol/Feature.js';
import LineString from '../../../../src/ol/geom/LineString.js';
import Map from '../../../../src/ol/Map.js';
import Stroke from '../../../../src/ol/style/Stroke.js';
import Style from '../../../../src/ol/style/Style.js';
import VectorLayer from '../../../../src/ol/layer/Vector.js';
import VectorSource from '../../../../src/ol/source/Vector.js';
import View from '../../../../src/ol/View.js';
const vectorSourceRed = new VectorSource();
const vectorSourceBlue = new VectorSource();
let feature;
feature = new Feature({
geometry: new LineString([
[-60, 20],
[45, 20],
]),
});
feature.setStyle(
new Style({
stroke: new Stroke({color: '#f00', width: 10}),
})
);
vectorSourceRed.addFeature(feature);
feature = new Feature({
geometry: new LineString([
[0, -50],
[0, 60],
]),
});
feature.setStyle(
new Style({
stroke: new Stroke({color: '#00f', width: 16}),
})
);
vectorSourceBlue.addFeature(feature);
new Map({
pixelRatio: 1,
layers: [
new VectorLayer({
zIndex: 1,
source: vectorSourceRed,
}),
new VectorLayer({
source: vectorSourceBlue,
}),
],
target: 'map',
view: new View({
center: [0, 0],
resolution: 1,
}),
});
render();