Пример #1
0
 /**
  * Sets the control position.
  *
  * @param string $controlPosition The control position.
  *
  * @throws \Ivory\GoogleMap\Exception\ControlException If the control position is not valid.
  */
 public function setControlPosition($controlPosition)
 {
     if (!in_array($controlPosition, ControlPosition::getControlPositions())) {
         throw ControlException::invalidControlPosition();
     }
     $this->controlPosition = $controlPosition;
 }
Пример #2
0
 /**
  * Sets the scale control style.
  *
  * @param type $scaleControlStyle The scale control style.
  *
  * @throws \Ivory\GoogleMap\Exception\ControlException If the scale control style is not valid.
  */
 public function setScaleControlStyle($scaleControlStyle)
 {
     if (!in_array($scaleControlStyle, ScaleControlStyle::getScaleControlStyles())) {
         throw ControlException::invalidScaleControlStyle();
     }
     $this->scaleControlStyle = $scaleControlStyle;
 }
Пример #3
0
 /**
  * Sets the zoom control style.
  *
  * @param string $zoomControlStyle The zoom control style.
  *
  * @throws \Ivory\GoogleMap\Exception\ControlException If the zoom control style is not valid.
  */
 public function setZoomControlStyle($zoomControlStyle)
 {
     if (!in_array($zoomControlStyle, ZoomControlStyle::getZoomControlStyles())) {
         throw ControlException::invalidZoomControlStyle();
     }
     $this->zoomControlStyle = $zoomControlStyle;
 }
 /**
  * Sets if the overview map control is opened.
  *
  * @param boolean $opened TRUE if the overview map control is opened else FALSE.
  *
  * @throws \Ivory\GoogleMap\Exception\ControlException If the opened flag is not valid.
  */
 public function setOpened($opened)
 {
     if (!is_bool($opened)) {
         throw ControlException::invalidOverviewMapControlOpened();
     }
     $this->opened = $opened;
 }
Пример #5
0
 /**
  * Sets the map type control style.
  *
  * @param type $mapTypeControlStyle The map type control style.
  *
  * @throws \Ivory\GoogleMap\Exception\ControlException If the map type control style is not valid.
  */
 public function setMapTypeControlStyle($mapTypeControlStyle)
 {
     if (!in_array($mapTypeControlStyle, MapTypeControlStyle::getMapTypeControlStyles())) {
         throw ControlException::invalidMapTypeControlStyle();
     }
     $this->mapTypeControlStyle = $mapTypeControlStyle;
 }