Preliminary Map Bound Data

This commit is contained in:
2021-07-26 21:22:34 -04:00
parent 1de99cce2e
commit 159fd64ce1
2 changed files with 19 additions and 5 deletions
+18
View File
@@ -106,6 +106,24 @@ function volDown() {
}));
}
function changeMapBounds() {
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://aa:8000/internet", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
console.log(xhr.response)
document.getElementById("volume_level").innerHTML = xhr.response
}
}
xhr.send(JSON.stringify({
start_lat: 0,
start_lon: 0,
end_lat: 0,
end_lon: 0
}));
}
function modal() {
var modal = document.getElementById("info_modal");
var btn = document.getElementById("info_button");
+1 -5
View File
@@ -83,13 +83,9 @@ setInterval(function () {
}, 1000);
app.post('/internet', (req, res) => {
console.log(req)
return res.send('Received a POST HTTP method');
});
app.get('/internet', (req, res) => {
return res.send('Received a GET HTTP method');
});
app.listen(8000, function () {
console.log('Example app listening on port ' + 8000 + '!');
});