/** * Renders an animation. * * @param string $animation The animation. * * @throws \Ivory\GoogleMap\Exception\HelperException If the animation is not valid. * * @return string The JS output. */ public function render($animation) { switch ($animation) { case Animation::BOUNCE: case Animation::DROP: return sprintf('google.maps.Animation.%s', strtoupper($animation)); default: throw HelperException::invalidAnimation(); } }