Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

83
Views
How do I use SetInterval to update pins on a google map from a database?

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#

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try this code :

function fetch(){
  var mapsvg = this;
  setInterval(()=>{ 
  mapsvg.database.find() 
  }, 1000);
}

fetch();
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!