0

Nowadays all my geopoints are loaded on the page´s onload event. I´d like to display new markers in the map, as soon as they come to the database. Is there a way to notify leaflet when the inserts occur in the database ? Or something like that? Or do i have to create a javascript infinit loop and keep this loop making ajax calls to check new positions at DB?

  • no easy task, but this may help you understand the issues - http://stackoverflow.com/questions/743346/live-update-notification-on-database-changes-mysql-php – sfletche May 04 '14 at 21:16
  • Im sorry, maybe i used the wrong words. It doesn´t need to be notified by the DB. I just need update the Map when a new position arrives. But i think im gonna do an infinite loop in the javascript, and keep checking on DB in every iteration. – Pierre Benazzi May 04 '14 at 22:21
  • better than an infinite loop - use a [polling strategy](http://stackoverflow.com/questions/3583203/server-polling-with-javascript) – sfletche May 05 '14 at 02:10

0 Answers0