public function setAnimation($animation = null)
    {
        if (!in_array($animation, Animation::getAnimations()) && ($animation !== null)) {
            throw OverlayException::invalidMarkerAnimation();
        }

        $this->animation = $animation;
    }