Package com.google.maps
Class ElevationApi
- java.lang.Object
-
- com.google.maps.ElevationApi
-
public class ElevationApi extends java.lang.Object
The Google Elevation API provides a simple interface to query locations on the earth for elevation data. Additionally, you may request sampled elevation data along paths, allowing you to calculate elevation changes along routes.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PendingResult<ElevationResult[]>
getByPath(GeoApiContext context, int samples, EncodedPolyline encodedPolyline)
See documentation.static PendingResult<ElevationResult[]>
getByPath(GeoApiContext context, int samples, LatLng... path)
See documentation.static PendingResult<ElevationResult>
getByPoint(GeoApiContext context, LatLng location)
Retrieves the elevation of a single location.static PendingResult<ElevationResult[]>
getByPoints(GeoApiContext context, EncodedPolyline encodedPolyline)
Retrieves the elevations of an encoded polyline path.static PendingResult<ElevationResult[]>
getByPoints(GeoApiContext context, LatLng... points)
Gets a list of elevations for a list of points.
-
-
-
Method Detail
-
getByPoints
public static PendingResult<ElevationResult[]> getByPoints(GeoApiContext context, LatLng... points)
Gets a list of elevations for a list of points.- Parameters:
context
- TheGeoApiContext
to make requests through.points
- The points to retrieve elevations for.- Returns:
- The elevations as a
PendingResult
.
-
getByPath
public static PendingResult<ElevationResult[]> getByPath(GeoApiContext context, int samples, LatLng... path)
See documentation.- Parameters:
context
- TheGeoApiContext
to make requests through.samples
- The number of samples to retrieve heights alongpath
.path
- The path to sample.- Returns:
- The elevations as a
PendingResult
.
-
getByPath
public static PendingResult<ElevationResult[]> getByPath(GeoApiContext context, int samples, EncodedPolyline encodedPolyline)
See documentation.- Parameters:
context
- TheGeoApiContext
to make requests through.samples
- The number of samples to retrieve heights alongencodedPolyline
.encodedPolyline
- The path to sample as an encoded polyline.- Returns:
- The elevations as a
PendingResult
.
-
getByPoint
public static PendingResult<ElevationResult> getByPoint(GeoApiContext context, LatLng location)
Retrieves the elevation of a single location.- Parameters:
context
- TheGeoApiContext
to make requests through.location
- The location to retrieve the elevation for.- Returns:
- The elevation as a
PendingResult
.
-
getByPoints
public static PendingResult<ElevationResult[]> getByPoints(GeoApiContext context, EncodedPolyline encodedPolyline)
Retrieves the elevations of an encoded polyline path.- Parameters:
context
- TheGeoApiContext
to make requests through.encodedPolyline
- The encoded polyline to retrieve elevations for.- Returns:
- The elevations as a
PendingResult
.
-
-