1 | <?php namespace Arcanedev\GeoLocation\Google\Elevation; |
||
13 | class ElevationService extends AbstractService |
||
14 | { |
||
15 | /* ----------------------------------------------------------------- |
||
16 | | Constants |
||
17 | | ----------------------------------------------------------------- |
||
18 | */ |
||
19 | |||
20 | const BASE_URL = 'https://maps.googleapis.com/maps/api/elevation/json'; |
||
21 | |||
22 | /* ----------------------------------------------------------------- |
||
23 | | Main Methods |
||
24 | | ----------------------------------------------------------------- |
||
25 | */ |
||
26 | |||
27 | /** |
||
28 | * Get the geocoding response. |
||
29 | * |
||
30 | * @param \Arcanedev\GeoLocation\Contracts\Entities\Coordinates\Position $position |
||
31 | * @param array $options |
||
32 | * |
||
33 | * @return \Arcanedev\GeoLocation\Google\Elevation\ElevationResponse |
||
34 | */ |
||
35 | 6 | public function location(PositionContract $position, array $options = []) |
|
43 | |||
44 | /** |
||
45 | * Reverse geocoding (address lookup). |
||
46 | * |
||
47 | * @param array $positions |
||
48 | * @param array $options |
||
49 | * |
||
50 | * @return \Arcanedev\GeoLocation\Google\Elevation\ElevationResponse |
||
51 | */ |
||
52 | public function path(array $positions, array $options = []) |
||
64 | |||
65 | /* ----------------------------------------------------------------- |
||
66 | | Other Methods |
||
67 | | ----------------------------------------------------------------- |
||
68 | */ |
||
69 | |||
70 | /** |
||
71 | * Prepare the response. |
||
72 | * |
||
73 | * @param \Psr\Http\Message\ResponseInterface $response |
||
74 | * |
||
75 | * @return \Arcanedev\GeoLocation\Google\AbstractResponse |
||
76 | */ |
||
77 | 9 | protected function prepareResponse(ResponseInterface $response) |
|
83 | } |
||
84 |