I have a Google map set up and it pulls locations from a database. If I refresh the page it is on it displays all of the pins properly, but I would like it to update every 10 seconds so that new pins will show up as they are added. I have the following code, but it isn't pulling the data in. Any help would be appreciated.
function(){
var mapsvg = this;
setInterval(()=>{
mapsvg.database.find()
}, 10000);
}
https://stackoverflow.com/questions/ask#
Try this code :
function fetch(){
var mapsvg = this;
setInterval(()=>{
mapsvg.database.find()
}, 1000);
}
fetch();