Hi
I added my marker like this.
popup["0000ebd6f70e0400"] = new mapboxgl.Popup({ offset: 38 }).setHTML('<h3>piGPS</h3><p style=\"text-align: Left;\"><u>Lat:</u> -24.675964<br><u>Lon:</u> 25.937508<br><u>Speed:</u> 45.7 km<br><u>Temp:</u> 27</p>');
marker["0000bd6f70e0400"] = new mapboxgl.Marker().setLngLat([25.937508,-24.675964]).setPopup(popup["b827ebd6f70e0400"]).addTo(map);
How can I change the color of the marker via js code?

Thanks!!
Hijacking this ticket into a discussion, should this be supported out of the box or left to 3rd parties? So something like:
new mapboxgl.Marker({color: 'red'})or
new mapboxgl.Marker(Fancy3rdPartyMarkerFactory({ icon: 'default', color: 'red' }))Either should be quite straightforward to implement, I'm happy to nut it out.
@qvs5010 to answer your question, at the moment you would need to create your own marker element with the design/colour you want and pass this in as the element.
Yip a feature like that will make things so much easier!
Most helpful comment
Hijacking this ticket into a discussion, should this be supported out of the box or left to 3rd parties? So something like:
new mapboxgl.Marker({color: 'red'})or
new mapboxgl.Marker(Fancy3rdPartyMarkerFactory({ icon: 'default', color: 'red' }))Either should be quite straightforward to implement, I'm happy to nut it out.
@qvs5010 to answer your question, at the moment you would need to create your own marker element with the design/colour you want and pass this in as the element.