Atlaslog
Atlaslog / OpenLayers / API reference / WebGLPoints
OpenLayers · API reference

WebGLPoints

Quick answer

WebGLPoints is ol.layer.WebGLPoints, a GPU-backed layer that draws hundreds of thousands of points in one draw call from a vector source. Its flat style object uses keys such as circle-radius, circle-fill-color, circle-opacity and circle-stroke-width, which accept constants or expressions like ['get', 'level']. Use it for dense point clouds where Canvas vector rendering stalls.

Last verified 2026-11-03 · OpenLayers 10.3.1 · Cite this page
new ol.layer.WebGLPoints({ source , style , ... })
Key points
Example
var layer = new ol.layer.WebGLPoints({
  source: new ol.source.Vector({ features: points }),
  style: {
    'circle-radius': ['*', ['get', 'magnitude'], 1.6],
    'circle-fill-color': [
      'match',
      ['get', 'level'],
      'high', 'rgba(214, 65, 65, 0.75)',
      'mid',  'rgba(233, 160, 46, 0.7)',
      'rgba(64, 132, 214, 0.65)'
    ],
    'circle-stroke-width': 1,
    'circle-stroke-color': 'rgba(255, 255, 255, 0.8)'
  },
  disableHitDetection: false,
  opacity: 0.95
});
Notes
Runnable examplesChinese originalAll API references
English edition written for Atlaslog. Code is taken from the original Chinese page and runs unchanged.
Cite this page

Atlaslog (2026). WebGLPoints. https://www.jingweizhi.com/en/openlayers/api/webgl-points-layer.html (accessed 2026-11-03).