I tried to keep this in a loop but webpage freezes every time I try to keep this in the loop. Any suggestion how to get location live update by this?
function hello(){
for(var i=0;i<=10;i++){
if(i==10){
call();
i=0;
}
}
function call(){
var settings = {
"url": "https://pos.ls.hereapi.com/positioning/v1/locate?apiKey=imnotgoingtoshareliveapikeyeveragain",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
"data": JSON.stringify({"lte":[{"mcc":404,"mnc":49,"cid":231706401}]}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
}