/** * Sets the y coordinate. * * @param double $y The y coordinate. * * @throws \Ivory\GoogleMap\Exception\BaseException If the Y coordinate is not valid. */ public function setY($y) { if (!is_numeric($y)) { throw BaseException::invalidPointY(); } $this->y = $y; }
/** * Sets the height unit size. * * @param string $heightUnit The height unit size. * * @throws \Ivory\GoogleMap\Exception\BaseException If the height unit is not valid. */ public function setHeightUnit($heightUnit) { if (!is_string($heightUnit) && $heightUnit !== null) { throw BaseException::invalidSizeHeightUnit(); } $this->heightUnit = $heightUnit; }
/** * Sets if the coordinate is wrap. * * @param boolean $noWrap TRUE if the coordinate is not wrap else FALSE. * * @throws \Ivory\GoogleMap\Exception\BaseException If the no wrap flag is not valid. */ public function setNoWrap($noWrap) { if (!is_bool($noWrap) && $noWrap !== null) { throw BaseException::invalidCoordinateNoWrap(); } $this->noWrap = $noWrap; }
/** * Sets the north east coordinate. * * Available prototypes: * - function setNorthEast(Ivory\GoogleMap\Base\Coordinate $northEast = null) * - function setNorthEast(double $latitude, double $longitude, boolean $noWrap = true) * * @throws \Ivory\GoogleMap\Exception\BaseException If the north east coordinate is not valid (prototypes). */ public function setNorthEast() { $args = func_get_args(); if (isset($args[0]) && $args[0] instanceof Coordinate) { $this->northEast = $args[0]; } elseif (isset($args[0]) && is_numeric($args[0]) && (isset($args[1]) && is_numeric($args[1]))) { if ($this->northEast === null) { $this->northEast = new Coordinate(); } $this->northEast->setLatitude($args[0]); $this->northEast->setLongitude($args[1]); if (isset($args[2]) && is_bool($args[2])) { $this->northEast->setNoWrap($args[2]); } } elseif (!isset($args[0])) { $this->northEast = null; } else { throw BaseException::invalidBoundNorthEast(); } }