/** * Sets the longitude. * * @param double $longitude The longitude. * * @throws \Ivory\GoogleMap\Exception\BaseException If the longitude is not valid. */ public function setLongitude($longitude) { if (!is_numeric($longitude) && $longitude !== null) { throw BaseException::invalidCoordinateLongitude(); } $this->longitude = $longitude; }