Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- blob = '0';
- function gps() {
- var xhr = new XMLHttpRequest;
- xhr.open('GET', 'https://jsonblob.com/api/jsonBlob/'+blob, false);
- xhr.onload = function() {
- if (xhr.status == 200) {
- try {var d = JSON.parse(xhr.response); home_lat = d[0]; home_lng = d[1];}
- catch(error) {}
- } else {console.log('Failed to get location')}
- };
- xhr.send();
- }
- var gpser = setInterval(gps, 60 * 1000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement