Пример #1
0
 /**
  * Makes elevation request by paths
  *
  * @param \dosamigos\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();
 }
Пример #2
0
 /**
  * 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();
 }