/**
  * Makes a reverse geocoding
  *
  * @param LatLng $coord
  * @param array $params parameters for the request. These override [GeocodingRequest::params].
  * @return mixed|null
  */
 public function reverse(LatLng $coord, $params = [])
 {
     $params['latlng'] = $coord;
     $this->params = ArrayHelper::merge($this->params, $params);
     return parent::request();
 }
 /**
  * Makes elevation request by paths
  *
  * @param \bariew\google\maps\LatLng[] $coords defines a path on the earth for which to return elevation data.
  * @param int $samples specifies the number of sample points along a path for which to return the elevation data.
  * @param bool $encode
  *
  * @return mixed|null
  */
 public function byPath($coords, $samples, $encode = true)
 {
     $this->params['path'] = $encode ? Encoder::encodeCoordinates($coords) : implode('|', $coords);
     $this->params['samples'] = $samples;
     return parent::request();
 }
 /**
  * @inheritdoc
  * @param array $config
  */
 public function __construct($config = [])
 {
     $this->params = ArrayHelper::merge(['origin' => null, 'destination' => null, 'mode' => null, 'waypoints' => null, 'alternatives' => null, 'avoid' => null, 'language' => null, 'units' => null, 'region' => null, 'departure_time' => null, 'arrival_time' => null], $this->params);
     parent::__construct($config);
 }