/**
  * Gets the "INVALID MARKER ANIMATION" exception.
  *
  * @return \Ivory\GoogleMap\Exception\OverlayException The "INVALID MARKER ANIMATION" exception.
  */
 public static function invalidMarkerAnimation()
 {
     return new static(sprintf('The animation of a marker can only be : %s.', implode(', ', Animation::getAnimations())));
 }
 public function testMapTypeControlStyles()
 {
     $expected = array(Animation::BOUNCE, Animation::DROP);
     $this->assertSame($expected, Animation::getAnimations());
 }
Esempio n. 3
0
 /**
  * Sets the marker animation.
  *
  * @param string $animation The marker animation.
  *
  * @throws \Ivory\GoogleMap\Exception\OverlayException If the animation is not valid.
  */
 public function setAnimation($animation = null)
 {
     if (!in_array($animation, Animation::getAnimations()) && $animation !== null) {
         throw OverlayException::invalidMarkerAnimation();
     }
     $this->animation = $animation;
 }