Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 5
    This works and is by far the easiest way without creating custom graphics or depending on a library or CDN. Thanks for sharing! Commented Mar 9, 2022 at 23:29
  • 4
    You can also directly change the style (without using a class) if you need more flexibility: marker._icon.style.filter = "hue-rotate(120deg)"
    – Simon
    Commented Dec 6, 2022 at 10:21
  • 2
    any way to do this but with an arbitrary color? Commented Dec 19, 2022 at 19:49
  • With Angular the style needs to be in the root styles.css and not in the component css file
    – Caustix
    Commented Nov 23, 2023 at 16:24