rebuildStyle = () => {
  const dash = document.getElementById('dashEnable').checked;
  const pattern = document.getElementById('patternEnable').checked;
  style = getStyle(dash, pattern);
  map.removeLayer(vector);
  vector = new WebGLVectorLayer({
    source,
    style,
    variables: {...styleVariables},
  });
  map.addLayer(vector);
}
@type {import('../src/ol/style/flat.js').FlatStyle}