28 lines
740 B
JavaScript
28 lines
740 B
JavaScript
var axios = require('axios');
|
|
var qs = require('qs');
|
|
var data = qs.stringify({
|
|
'data': '[bbox:51.990800124058914,10.045623779296875,52.552976197007524,11.01104736328125]\n[out:json]\n;\n(\n node["shop"="second_hand"];\n way["shop"="second_hand"];\n relation["shop"="second_hand"];\n);\nout center;'
|
|
});
|
|
var config = {
|
|
method: 'post',
|
|
maxBodyLength: Infinity,
|
|
url: 'https://overpass-api.de/api/interpreter',
|
|
headers: {
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
},
|
|
data : data
|
|
};
|
|
|
|
function myFunction(value,key) {
|
|
console.log("key: "+key+",type: "+value.type);
|
|
}
|
|
|
|
axios(config)
|
|
.then(function (response) {
|
|
//log JSON
|
|
console.log(response.data);
|
|
})
|
|
.catch(function (error) {
|
|
console.log(error);
|
|
});
|