# Google Maps Map Movement

**URL:** <https://www.ruby-forum.com/t/google-maps-map-movement/111047>\
**Category:** Rails\
**Created:** [August 2, 2007, 5:38am UTC](https://www.ruby-forum.com/t/google-maps-map-movement/111047 "2007-08-02T05:38:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![freaknasty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/a8b319/32.png) [@freaknasty](https://www.ruby-forum.com/u/freaknasty)\
**Post date:** [August 2, 2007, 5:38am UTC](https://www.ruby-forum.com/t/google-maps-map-movement/111047/1 "2007-08-02T05:38:34Z")

</div>

Hi everyone,

I need help with RoR and Google Maps. Here is my dilemma. Say  
coordinates are being fed into a db. I would like to create a page that  
gets those coordinates say every 5 seconds and moves a marker on a  
Google Map. I do not want to refresh the page. Maybe AJAX? I’m not  
sure. Has anyone ever done this? Any help would be greatly appreciated.

d

---

<div class="post-metadata">

**Author:** ![freaknasty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/a8b319/32.png) [@freaknasty](https://www.ruby-forum.com/u/freaknasty)\
**Post date:** [August 2, 2007, 6:59am UTC](https://www.ruby-forum.com/t/google-maps-map-movement/111047/2 "2007-08-02T06:59:02Z")

</div>

You’ll want to use Prototypes PeriodicalExecuter function to  
periodically call more data from Ruby and execute a function in your  
javascript.  
Check the API for Prototype:  
[http://www.prototypejs.org/api/periodicalExecuter](http://www.prototypejs.org/api/periodicalExecuter)

Cheers,  
Cam
