/**
  * Add a map type ID.
  *
  * @param string $mapTypeId The map type ID to add.
  *
  * @throws \Ivory\GoogleMap\Exception\ControlException If the map type ID is not valid.
  */
 public function addMapTypeId($mapTypeId)
 {
     if (!in_array($mapTypeId, MapTypeId::getMapTypeIds())) {
         throw ControlException::invalidMapTypeId();
     }
     if (!in_array($mapTypeId, $this->mapTypeIds)) {
         $this->mapTypeIds[] = $mapTypeId;
     }
 }
 public function testMapTypeIds()
 {
     $expected = array(MapTypeId::HYBRID, MapTypeId::ROADMAP, MapTypeId::SATELLITE, MapTypeId::TERRAIN);
     $this->assertSame($expected, MapTypeId::getMapTypeIds());
 }
 /**
  * Gets the "INVALID MAP TYPE ID" exception.
  *
  * @return \Ivory\GoogleMap\Exception\ControlException The "INVALID MAP TYPE ID" exception.
  */
 public static function invalidMapTypeId()
 {
     return new static(sprintf('The map type id can only be : %s.', implode(', ', MapTypeId::getMapTypeIds())));
 }