# Google Maps with Rails

**URL:** <https://www.ruby-forum.com/t/google-maps-with-rails/116775>\
**Category:** Rails\
**Created:** [October 9, 2007, 6:05pm UTC](https://www.ruby-forum.com/t/google-maps-with-rails/116775 "2007-10-09T18:05:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dehlan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dehlan](https://www.ruby-forum.com/u/dehlan)\
**Post date:** [October 9, 2007, 6:05pm UTC](https://www.ruby-forum.com/t/google-maps-with-rails/116775/1 "2007-10-09T18:05:59Z")

</div>

I’m new to the rails framework, as well as the google maps API,  
however I’m looking to learn both to write up a small app for my own  
use (or maybe for a few friends as well). Basically, I’m looking to  
see if anyone thinks Rails/Google maps would be capable of the  
functionality I’m looking for.

The small app would do as follows. Use google local/google maps to  
search and find places that I’ll need to go to during the day, and  
then allow me to mark them with the time that I need to be somewhere  
while displaying my route on the google map. So, for example, if I  
need to be at Tea Lounge on Union St. in Brooklyn to get some work  
done, I should be able to search and find it from google local and  
mark it with the time I need to be there (say 9 am). Then I want to  
grab some lunch in Brooklyn Heights before I run to the next place I  
need to be – I search for pizza in brooklyn heights and I find a good  
place on Montague st, so I mark that and add it to my map, etc. After  
I find all my places, maybe have a publish button that will display it  
all in a list on [www.mypage.com/controller/todaysdate](http://www.mypage.com/controller/todaysdate).

I feel as if this is something fairly easy to do. Have Google local  
do the search, display it on my page with the corresponding map  
location, put a flag marker at it with the time, then repeat. How can  
the model interact with the data pulled from Google local? Any  
suggestions? Thanks!

---

<div class="post-metadata">

**Author:** ![dehlan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dehlan](https://www.ruby-forum.com/u/dehlan)\
**Post date:** [October 9, 2007, 10:20pm UTC](https://www.ruby-forum.com/t/google-maps-with-rails/116775/2 "2007-10-09T22:20:27Z")

</div>

> I feel as if this is something fairly easy to do. Have Google local  
> do the search, display it on my page with the corresponding map  
> location, put a flag marker at it with the time, then repeat. How can  
> the model interact with the data pulled from Google local?

I’m not sure I understand your problem completely.

When you use Google local to lookup an addresses I would think you  
update the map to show the location that is returned by Google.

Now when you let the user place markers (including time/description),  
when you post that data to the server, you can include the maps corners,  
see GMap2 method getBounds() at  
[Google Maps Platform Documentation &nbsp;|&nbsp; Maps JavaScript API &nbsp;|&nbsp; Google for Developers](http://www.google.com/apis/maps/documentation/reference.html#GMap2) or  
the maps center (getCenter() method)

Then you save those and use them for redisplaying

Or you can use  
[http://quikmaps.com/new](http://quikmaps.com/new) (I’m working on  
[http://stbgo.org/mapping/labels\_spots?name=home](http://stbgo.org/mapping/labels_spots?name=home) which could do the same)

See you

Stephan

Any

> suggestions? Thanks!
