Is there a way to randomly change marker-colors in native Leaflet? I'm using svg elements which could be styled. I know that it is possible with mapbox.js
EDIT: ToTo clarify what I intend to do: If you add markers to the map via a doubleclick or something it should have random colors. To achieve this I wanted to use svg icons for the markers to style them.
This is my code:
myIcon = L.icon({
iconUrl: "icon_33997.svg",
iconAnchor: pinAnchor
});
newMarker = L.marker(lat, long], {
icon: myIcon
});