Webgl points layer / allow disabling hit detection

Having hit detection enabled has an overhead as it means
continously generating additional render instructions and rendering
to an offscreen canvas
This commit is contained in:
Olivier Guyot
2019-10-25 15:11:29 +02:00
parent 4462608991
commit e63bb45e6f
3 changed files with 16 additions and 4 deletions

View File

@@ -117,7 +117,8 @@ function refreshLayer(newStyle) {
const previousLayer = pointsLayer;
pointsLayer = new WebGLPointsLayer({
source: vectorSource,
style: newStyle
style: newStyle,
disableHitDetection: true
});
map.addLayer(pointsLayer);