Just extending OverlayView
as suggested by giogiga is probably the safest way to go, but it's clearly not the easy way, because Marker
has a lot of built-in stuff like icon, shadow, and draggability.
It's really tempting to just extend the Marker
class, but that class is opaque - it doesn't reveal its internals, e.g. you can't easily access the underlying DOM elements, which you would need to animate the marker. You could hack together something with setPosition
, but the result will be something fragile and buggy. Alternatively you could hack your way into the underlying DOM nodes, but then your could would be even more fragile.
So it seems that completely reimplementing Marker
is still the best way to go.