# Google maps api in ruby/rails

**URL:** <https://www.ruby-forum.com/t/google-maps-api-in-ruby-rails/96874>\
**Category:** Rails\
**Created:** [July 3, 2006, 12:46am UTC](https://www.ruby-forum.com/t/google-maps-api-in-ruby-rails/96874 "2006-07-03T00:46:49Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [July 3, 2006, 12:46am UTC](https://www.ruby-forum.com/t/google-maps-api-in-ruby-rails/96874/1 "2006-07-03T00:46:49Z")

</div>

I’ve been looking for any modules/tools that are available for using  
the google maps api in rails. I found a couple of quick examples, but  
not much more. If anyone knows of good sites that cover using google  
maps api in rails please post it here:)

Chris

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [July 3, 2006, 12:50am UTC](https://www.ruby-forum.com/t/google-maps-api-in-ruby-rails/96874/2 "2006-07-03T00:50:22Z")

</div>

On Jul 3, 2006, at 4:13 AM, snacktime wrote:

> I’ve been looking for any modules/tools that are available for using  
> the google maps api in rails. I found a couple of quick examples, but  
> not much more. If anyone knows of good sites that cover using google  
> maps api in rails please post it here:)

[http://wiki.rubyonrails.com/rails/pages/Cartographer+Plugin](http://wiki.rubyonrails.com/rails/pages/Cartographer+Plugin)

You may want to update the plugin if you end up using it.

Warren Brian Noronha

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [July 3, 2006, 2:02am UTC](https://www.ruby-forum.com/t/google-maps-api-in-ruby-rails/96874/3 "2006-07-03T02:02:55Z")

</div>

What are you trying to do? I went with Cartographer for a while, but it  
really  
wasn’t quite what I needed. In the end it turned I could go mostly with  
javascript code.

Stephan

snacktime wrote:

> I’ve been looking for any modules/tools that are available for using  
> the google maps api in rails. I found a couple of quick examples, but  
> not much more. If anyone knows of good sites that cover using google  
> maps api in rails please post it here:)
> 
> Chris

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [July 3, 2006, 2:15am UTC](https://www.ruby-forum.com/t/google-maps-api-in-ruby-rails/96874/4 "2006-07-03T02:15:04Z")

</div>

On 7/2/06, Stephan W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> What are you trying to do? I went with Cartographer for a while, but it  
> really  
> wasn’t quite what I needed. In the end it turned I could go mostly with  
> javascript code.

It’s for a web site where people can do a proximity search for doctors  
within X miles of their home. The search is in postgresql, then once  
we have all the points we want to display a map centered on the house  
with an icon overlay for each doctor. We also need driving  
directions. I like the google maps better than mapquest, but google  
doesn’t have driving directions and mapquest does. So if it’s not too  
much work we will use google for the maps and mapquest for driving  
directions.

If anyone has done something similar I’d appreciate any feedback.  
This is for a client site and I’d like to get it all working within a  
couple of months.

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [July 3, 2006, 2:33am UTC](https://www.ruby-forum.com/t/google-maps-api-in-ruby-rails/96874/5 "2006-07-03T02:33:28Z")

</div>

On 03/07/06, Stephan W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> What about the ads that Google wants to display with the maps at some  
> point?

I thought the situation was that they reserve the right to put ads  
with the maps, but don’t plan to.  
-Nathan

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [July 3, 2006, 2:29am UTC](https://www.ruby-forum.com/t/google-maps-api-in-ruby-rails/96874/6 "2006-07-03T02:29:11Z")

</div>

Couple of months should be plenty and you can do this with Cartographer.

What about the ads that Google wants to display with the maps at some  
point?

I wanted to avoid redrawing/reloading the map all the time. So I  
assembled my own javascript to control the markers, which gets used by  
server responses (Ajax).

Stephan

snacktime wrote:

> On 7/2/06, Stephan W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > What are you trying to do? I went with Cartographer for a while, but it  
> > really  
> > wasn’t quite what I needed. In the end it turned I could go mostly with  
> > javascript code.
> 
> It’s for a web site where people can do a proximity search for doctors  
> within X miles of their home. The search is in postgresql, then once  
> we have all the points we want to display a map centered on the house  
> with an icon overlay for each doctor. We also need driving  
> directions. I like the google maps better than mapquest, but google  
> doesn’t have driving directions and mapquest does. So if it’s not too  
> much work we will use google for the maps and mapquest for driving  
> directions.
> 
> If anyone has done something similar I’d appreciate any feedback.  
> This is for a client site and I’d like to get it all working within a  
> couple of months.

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [July 3, 2006, 2:52am UTC](https://www.ruby-forum.com/t/google-maps-api-in-ruby-rails/96874/7 "2006-07-03T02:52:22Z")

</div>

On Jul 2, 2006, at 6:43 PM, snacktime wrote:

> I’ve been looking for any modules/tools that are available for using  
> the google maps api in rails. I found a couple of quick examples, but  
> not much more. If anyone knows of good sites that cover using google  
> maps api in rails please post it here:)

You may want to check out the ym4r gem.

> **[thepochisuperstarmegashow.com](http://thepochisuperstarmegashow.com/projects/#ym4r)**
>
> This domain may be for sale!

I switched my app to that from Cartographer recently.

–Wade

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [July 3, 2006, 2:48am UTC](https://www.ruby-forum.com/t/google-maps-api-in-ruby-rails/96874/8 "2006-07-03T02:48:59Z")

</div>

On 7/2/06, Stephan W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Couple of months should be plenty and you can do this with Cartographer.
> 
> What about the ads that Google wants to display with the maps at some  
> point?

When they do that, hopefully they will have a commercial version  
without ads that’s cost effective.

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [July 4, 2006, 11:39am UTC](https://www.ruby-forum.com/t/google-maps-api-in-ruby-rails/96874/9 "2006-07-04T11:39:50Z")

</div>

hi, how I can obtain the coordinates when I do click in the map?

thanks,

2006/7/2, H. Wade M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [July 4, 2006, 11:52am UTC](https://www.ruby-forum.com/t/google-maps-api-in-ruby-rails/96874/10 "2006-07-04T11:52:12Z")

</div>

THis should help:

[http://www.google.com/apis/maps/documentation/index.html#Event\_Listeners](http://www.google.com/apis/maps/documentation/index.html#Event_Listeners)

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [July 4, 2006, 11:52am UTC](https://www.ruby-forum.com/t/google-maps-api-in-ruby-rails/96874/11 "2006-07-04T11:52:19Z")

</div>

I think you can get a Google Maps In a Box now…

> **[Google Maps Platform - Location and Mapping Solutions](https://mapsplatform.google.com/)**
>
> Create real world and real time experiences for your customers with dynamic maps, routes & places APIs from Google Maps Platform’s location solutions.

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [July 5, 2006, 10:01am UTC](https://www.ruby-forum.com/t/google-maps-api-in-ruby-rails/96874/12 "2006-07-05T10:01:00Z")

</div>

hi again,

how I can obtain the coordinates when I do click in the map but using  
ym4r?

thanks

2006/7/4, Geoff H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
