Set the latitude for the widget.

@param  float $coord The latitude of a location.
@throws InvalidArgumentException If the longitude is not a number.
@return self
514054
public function setLat($coord)
    {
        if ($coord === null) {
            $this->lat = $coord;
            return $this;
        }

        if (!is_numeric($coord)) {
            throw new InvalidArgumentException(
                'The "lat" must be a number'
            );
        }

        $this->lat = (float)$coord;

        return $this;
    }
151184
public function setRange($range)
    {
        $allowed_values = array('station', 'region', 'solarsystem', '1', '2', '3', '4', '5', '10', '20', '30', '40');
        if ((!in_array($range, $allowed_values))) {
            throw new \InvalidArgumentException("Invalid value for 'range', must be one of 'station', 'region', 'solarsystem', '1', '2', '3', '4', '5', '10', '20', '30', '40'");
        }
        $this->container['range'] = $range;

        return $this;
    }
169647
public function setAngleDegrees($degree)
	{
		if ( ! is_numeric($degree))
		{
			throw new \InvalidArgumentException('Angle degrees must be a numeric.');
		}
		
		$this->setAngle($degree * pi() / 180);
		
		return $this;
	}
1221400
public function setConjunction($conjunction)
    {
        if (!is_string($conjunction)) {
            throw new InvalidArgumentException(
                'Conjunction should be a string.'
            );
        }

        $conjunction = strtoupper($conjunction);
        if (!in_array($conjunction, $this->validConjunctions())) {
            throw new InvalidArgumentException(sprintf(
                'Conjunction "%s" not allowed in this context.',
                $conjunction
            ));
        }

        $this->conjunction = $conjunction;
        return $this;
    }
578862
public function setAxis($axis)
    {
        if (is_string($axis) === true) {
            $this->axis = $axis;
        } else {
            $msg = "The 'axis' argument must be a string, '" . gettype($axis) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
394423
public function setDirection($direction)
    {
        if ($direction !== self::DIRECTION_FORWARD && $direction !== self::DIRECTION_REVERSE && $direction !== self::DIRECTION_BOTH) {
            throw new InvalidArgumentException('Invalid direction given');
        }
        $this->direction = $direction;

        return $this;
    }
1119392
public function setPosition($position)
    {
        if (false === Numeric::isPositiveInteger($position, false)) {
            throw new InvalidArgumentException('A position must be a positive integer.');
        }
        $this->_position = $position;
        return $this;
    }
1193885
public function setLocale(string $locale): self
	{
		if ($locale === '') {
			$this->locale = $locale;
		} else {
			if (!\Locale::parseLocale($locale)) {
				throw new \InvalidArgumentException(sprintf('Invalid locale "%s"', $locale));
			}
			$this->locale = \Locale::canonicalize($locale);
		}

		$this->setOptions['locale'] = null;

		return $this;
	}
994305
public function reverse(LatLng $coord, $params = [])
    {
        $params['latlng'] = $coord->__toString();

        $this->params = ArrayHelper::merge($this->params, $params);

        return parent::request();
    }
1298991
public function distanceFrom(LatLng $coord)
    {
        $latDist = abs($this->getLat() - $coord->getLat());
        $lngDist = abs($this->getLng() - $coord->getLng());

        $radDist = deg2rad(sqrt(pow($latDist, 2) + pow($lngDist, 2)));

        return $radDist * UnitsType::EARTH_RADIUS;
    }
29885
public function setLongitude($value)
    {
        if (is_float($value) || is_int($value) || (is_string($value) && is_numeric($value))) {
            $this->longitude = (float) $value;
        } else {
            $this->longitude = null;
        }

        return $this;
    }
1169674
public function setNumber($num)
    {
        $num = (int) $num;
        if ($num <= 0) {
            throw new \InvalidArgumentException(sprintf(
                    'Invalid Number "%s" - Polygon Coordinates Number Must Be '
                    . 'Greater Than Zero'
                    , $num
            ));
        }
        $count = count($this->getCoordinates());
        if ($num > $count) {
            throw new \OutOfBoundsException(sprintf(
                    'Given Coodrinates Number "%s" Is Greater Than The Actual '
                    . 'Coordinates Array Size "%s"'
                    , $num, $count
            ));
        }
        $this->count = $num;

        return $this;
    }
1109490
public function setDirectionCo($gpsArray){
		$this->directionLat1 = $gpsArray[0]['lat'];
		$this->directionLat2 = $gpsArray[1]['lat'];
		$this->directionLong1 = $gpsArray[0]['long'];
		$this->directionLong2 = $gpsArray[1]['long'];
	}
1185428
protected function setLocation()
    {
        if (!isset($this->job)) {
            throw new \InvalidArgumentException('cannot create a viewModel for Templates without aa $job');
        }
        $location = $this->job->getLocation();
        $this->container['location'] = isset($location)?$location:'';
        return $this;
    }
332090
public function exactDistanceFrom(LatLng $coord)
    {
        $lat1 = deg2rad($this->getLat());
        $lat2 = deg2rad($coord->getLat());
        $lon1 = deg2rad($this->getLng());
        $lon2 = deg2rad($coord->getLng());

        $dLatHalf = ($lat2 - $lat1) / 2;
        $dLonHalf = ($lon2 - $lon1) / 2;

        $a = pow(sin($dLatHalf), 2) + cos($lat1) * cos($lat2) * pow(sin($dLonHalf), 2);
        $c = 2 * atan2(sqrt($a), sqrt(1 - $a));

        return $c * UnitsType::EARTH_RADIUS;
    }
614096
public function setLatLongRect($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\LatLongRect::class);
        $this->lat_long_rect = $var;

        return $this;
    }
222516
public function setLatProperty($key)
    {
        if ($key === null) {
            $this->latProperty = $key;
            return $this;
        }

        if (!is_string($key)) {
            throw new InvalidArgumentException(
                'The "lat_property" must be a string'
            );
        }

        $this->latProperty = $key;
        return $this;
    }