Hi,

I have a table in a database that gets populated by a client application.
Whenever an entry is written to the table I want to fetch the data (which contains the longitude and latitude) and display a marker on Google Maps. I am using the Google Maps Javascript V3 API. Reading the tuples from the database is currently done through a PHP script. How can I update the map each time a tuple is written to the database?

Thanks in advance.

If you want your map to do a "live" update, then you need to make a polling mechanism. Use AJAX to check with the server, say, every minute. The server would need to keep track of the last item returned per session.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.