Webgl / linting & test fixes

This commit is contained in:
Olivier Guyot
2019-09-25 12:44:55 +02:00
parent 610a846149
commit 9e55a8b2f0
8 changed files with 34 additions and 33 deletions

View File

@@ -2,28 +2,23 @@ import Map from '../../../src/ol/Map.js';
import View from '../../../src/ol/View.js';
import TileLayer from '../../../src/ol/layer/Tile.js';
import XYZ from '../../../src/ol/source/XYZ.js';
import {Vector as VectorLayer} from '../../../src/ol/layer.js';
import VectorSource from '../../../src/ol/source/Vector.js';
import KML from '../../../src/ol/format/KML.js';
import WebGLPointsLayerRenderer from '../../../src/ol/renderer/webgl/PointsLayer.js';
import WebGLPointsLayer from '../../../src/ol/layer/WebGLPoints.js';
class CustomLayer extends VectorLayer {
createRenderer() {
return new WebGLPointsLayerRenderer(this, {
sizeCallback: function() {
return 4;
}
});
}
}
const vector = new CustomLayer({
const vector = new WebGLPointsLayer({
source: new VectorSource({
url: '/data/2012_Earthquakes_Mag5.kml',
format: new KML({
extractStyles: false
})
})
}),
literalStyle: {
symbol: {
size: 4,
color: 'white'
}
}
});
const raster = new TileLayer({