UNPKG

srtm-elevation

Version:

Read and query HGT files from SRTM, for elevation data with high performance. This module use cached and automatically download HGT files as required.

18 lines (15 loc) 348 B
module.exports = function _latLng(ll) { if (ll.lat !== undefined && ll.lng !== undefined) { return ll; } return new LatLng(ll[0], ll[1]) }; function LatLng(lat, lng) { this.lat = lat; this.lng = lng; } LatLng.prototype = { toString: function() { return 'lat=' + this.lat + ', lng=' + this.lng } }