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:
@@ -122,7 +122,8 @@ const map = new Map({
|
||||
}),
|
||||
new WebGLPointsLayer({
|
||||
style: style,
|
||||
source: vectorSource
|
||||
source: vectorSource,
|
||||
disableHitDetection: true
|
||||
})
|
||||
],
|
||||
target: document.getElementById('map'),
|
||||
|
||||
@@ -117,7 +117,8 @@ function refreshLayer(newStyle) {
|
||||
const previousLayer = pointsLayer;
|
||||
pointsLayer = new WebGLPointsLayer({
|
||||
source: vectorSource,
|
||||
style: newStyle
|
||||
style: newStyle,
|
||||
disableHitDetection: true
|
||||
});
|
||||
map.addLayer(pointsLayer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user