class Elevation extends Api

Class Elevation

Constants

SERVICE_ENDPOINT

Properties

protected GoogleMapsApi $google_maps_api from Api
protected string $result_collection
protected GoogleMapsResponse $response from Api
protected GoogleMapsRequest $request from Api

Methods

__construct(array $config = [])

Api constructor.

from Api
array
getServiceConfig(array $config = [])

No description

from Api
string
getServiceEndpoint()

No description

from Api
callApi(array $params, string|null $endpoint = null)

No description

from Api
createRequest(array $params, string|null $endpoint = null)

No description

from Api
getResponse()

No description

from Api
getGoogleMapsApi()

No description

from Api
Api
setGoogleMapsApi(GoogleMapsApi $google_maps_api)

No description

from Api
bool
responseHasNewPage()

No description

from Api
getByLocations(LatLng|string|array $locations)

Positional Requests

string
parseLocations(array|string $locations)

No description

getBySampledPath(array|string $path, int $samples)

Sampled Path Requests

Details

in Api at line 57
__construct(array $config = [])

Api constructor.

Parameters

array $config

in Api at line 69
protected array getServiceConfig(array $config = [])

Parameters

array $config

Return Value

array

in Api at line 80
string getServiceEndpoint()

Return Value

string

in Api at line 92
GoogleMapsResultsCollection callApi(array $params, string|null $endpoint = null)

Parameters

array $params
string|null $endpoint

Return Value

GoogleMapsResultsCollection

in Api at line 106
GoogleMapsRequest createRequest(array $params, string|null $endpoint = null)

Parameters

array $params
string|null $endpoint since 0.5.0

Return Value

GoogleMapsRequest

in Api at line 117
GoogleMapsResultsCollection getResultsCollections()

in Api at line 130
GoogleMapsResponse getResponse()

Return Value

GoogleMapsResponse

in Api at line 141
GoogleMapsApi getGoogleMapsApi()

Return Value

GoogleMapsApi

in Api at line 152
Api setGoogleMapsApi(GoogleMapsApi $google_maps_api)

Parameters

GoogleMapsApi $google_maps_api

Return Value

Api

in Api at line 163
GoogleMapsResultsCollection getNextPage()

in Api at line 176
bool responseHasNewPage()

Return Value

bool

at line 51
GoogleMapsResultsCollection getByLocations(LatLng|string|array $locations)

Positional Requests

Parameters

LatLng|string|array $locations This parameter takes either a single location or multiple locations passed as an array or as an encoded polyline

Return Value

GoogleMapsResultsCollection

at line 68
string parseLocations(array|string $locations)

Parameters

array|string $locations

Return Value

string

at line 99
GoogleMapsResultsCollection getBySampledPath(array|string $path, int $samples)

Sampled Path Requests

Parameters

array|string $path This parameter takes either a multiple locations passed as an array or as an encoded polyline
int $samples This will be the number of results as well

Return Value

GoogleMapsResultsCollection

Exceptions

InvalidArgumentException