MCPcopy Index your code
hub / github.com/googlemaps/google-maps-services-python / elevation

Function elevation

googlemaps/elevation.py:23–37  ·  view source on GitHub ↗

Provides elevation data for locations provided on the surface of the earth, including depth locations on the ocean floor (which return negative values) :param locations: List of latitude/longitude values from which you wish to calculate elevation data. :type locations:

(client, locations)

Source from the content-addressed store, hash-verified

21
22
23def elevation(client, locations):
24 """
25 Provides elevation data for locations provided on the surface of the
26 earth, including depth locations on the ocean floor (which return negative
27 values)
28
29 :param locations: List of latitude/longitude values from which you wish
30 to calculate elevation data.
31 :type locations: a single location, or a list of locations, where a
32 location is a string, dict, list, or tuple
33
34 :rtype: list of elevation data responses
35 """
36 params = {"locations": convert.shortest_path(locations)}
37 return client._request("/maps/api/elevation/json", params).get("results", [])
38
39
40def elevation_along_path(client, path, samples):

Callers

nothing calls this directly

Calls 1

_requestMethod · 0.80

Tested by

no test coverage detected