Skip to content

mcwhittemore/mapbox-elevation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mapbox Elevation

Quickly get the elevation of any point in the world from Mapbox's terrian-rgb datasource.

This module requires a Mapbox account to use. Get a free one here.

The result is in meters.

For details on how this works, please see this blog post.

Usage

npm install mapbox-elevation

var MapboxElevation = require('mapbox-elevation');
var getElevation('YOUR-MAPBOX-TOKEN');

getElevation([86.925313, 27.988730], function(err, elevation) {
  console.log('elevation at the summit of mt everest', elevation);
});

API

getElevation(point, callback)

The point must be a [longitude, latitude] array and the callback follows the standard (err, value) convension of node.

About

quickly get the elevation of any point in the world

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published