/** * Sets the distance in meters. * * @param double $value The distance in meters. * * @throws \Ivory\GoogleMap\Exception\ServiceException If the distance is not valid. */ public function setValue($value) { if (!is_numeric($value)) { throw ServiceException::invalidDistanceValue(); } $this->value = $value; }