I'm trying to pass different rgba colors to different points in mapbox. I added a realiveOpacity property to each dot and would like to generate the correct color string from its data. I tried both expression but I guess the syntax is somehow wrong. How would it go correctly?
'circle-color': ["string", "rgba(255, 0, 0, ['get', 'realiveOpacity'])"]
["string", "rgba(255, 0, 0,"+ ['get', 'realiveOpacity'] + " )"]
This Constructor works:
["string", "rgba(255, 0, 0,0.5"]
Thanks a lot!