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.
18 lines
398 B
18 lines
398 B
7 years ago
|
const request = require('request');
|
||
|
const logger = require('pelias-logger').get('api');
|
||
|
|
||
|
"use strict";
|
||
|
|
||
|
async function geotrans(coord) {
|
||
|
let result;
|
||
|
request(`http://10.0.2.62:3150?datum=WGE&coord=${coord}`, function (error, response, body) {
|
||
|
logger.info(response.body);
|
||
|
result = response.body;
|
||
|
});
|
||
|
return result;
|
||
|
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
geotrans: geotrans
|
||
|
};
|