I use the following code in order to change the fillColor of a marker within my leaflet-client, as suggested on this post: https://gis.stackexchange.com/a/124928/20297
var marker = marker = L.circleMarker(latlng, myMarkerOptions).addTo(map);
marker.valueOf()._icon.style.fillColor = 'green'
However when I execute this, I get the following error:
Cannot read property 'style' of undefined
I also tried to directly change the markers color:
marker.fillColor = 'green'
which simply does absolutely nothing.
My browser is an Opera 66. However I also checked FireFox to no avail.