mirror of https://github.com/pelias/api.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
448 B
23 lines
448 B
"use strict"; |
|
|
|
const axios = require('axios'); |
|
const geotransIP = process.env.GEOTRANS_IP; |
|
|
|
function geotrans(coord) { |
|
let result; |
|
return axios.get(`http://${geotransIP}:3150`, { |
|
params:{ |
|
'datum':'WGE', |
|
'coord':coord |
|
} |
|
}) |
|
.then(function (response){ |
|
return response.data; |
|
}).catch(function (reason){ |
|
return reason; |
|
}); |
|
} |
|
|
|
module.exports = { |
|
geotrans: geotrans |
|
}; |