I’m working with a Geo Map GL visualization that includes a shape layer. What I’d like to do is adjust the opacity of that layer purely as a visual change. However, I want to avoid re-rendering the chart or triggering a new query, since this is only an aesthetic adjustment.
Is there a way to update the layer’s opacity directly, without forcing a full re-render?
Got it, well you can use the updateLayer function, that function will update layer properties and options without having to re-query data, let me show you an example:
const mapViz = cf.getVisualization('visualization-id');
// Tile
const shapeLayer = mapViz.get('getDefinedLayer')('your_shape_layer_name');
shapeLayer.properties.options.shapeOpacity = 0.15; // the opacity you want
map.get('updateLayer')(shapeLayer);