I've been attempting to change the stroke of a circle upon clicking it on mapbox. Despite following mapbox's documentation, the values don't seem to update. The console is also clear.
t.map.addLayer({
id: id,
type: 'circle',
source: id,
paint: {
'circle-radius': 100,
'circle-opacity': 0.5,
'circle-color': 'rgba(20, 106, 181, 0.11)',
'circle-stroke-color': [
'case', ['boolean', ['feature-state', 'clicked'], false],
'rgba(20, 106, 181, 0.11)',
'#146ab5',
],
'circle-stroke-width': [
'case', ['boolean', ['feature-state', 'clicked'], false],
2,
0,
],
},
});
I then proceed to update the state:
t.map.on('click', id, (e) => {
t.map.setFeatureState({ source: id, id: id }, { clicked: true });
});
I have carefully checked each step, but unfortunately, the values remain unchanged. Appreciate any help with this issue.