google-elevation-api
This module will help reading the Google Maps Elevation API.
Example
var elevationApi = ; ;
Usage
require('google-elevation-api')(options, callback)
;
This module exports a function you pass options
and a callback
to. options
should have your Google Maps API key in a variable called key
. And an array of locations
.
For example:
key: 'some google maps api key' locations: 43669662 -79282848 62794543 22827826
locations
are formed are [lay, lng]
arrays.
The callback
should be a node style callback and returns an Error
or null
as the first argument and an Array
of elevation/location info as the second argument.
Each item in the Array
of returned locations contains the following:
elevation: 7484200286865234 // in meters location: 4366966 // lat -7928285 // lng resolution: 1527032318115234 // resolution of the sample // for more info on resolution checkout // https://developers.google.com/maps/documentation/elevation/
License
MIT, see LICENSE.md for details.