# Google map integration

**URL:** <https://www.ruby-forum.com/t/google-map-integration/192325>\
**Category:** Rails\
**Created:** [July 28, 2010, 10:04am UTC](https://www.ruby-forum.com/t/google-map-integration/192325 "2010-07-28T10:04:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [July 28, 2010, 10:04am UTC](https://www.ruby-forum.com/t/google-map-integration/192325/1 "2010-07-28T10:04:43Z")

</div>

Hi,  
I am doing a google map integration using “geokit” and “YM4R/GM” plugin.  
Whenever I am passing the “area name” the it is ,marking that in google  
map properly.  
But my client wants whenever user adds the “IT Companies in India” then  
GMap should mark all locations of india where the companies are located.

Can anyone tell how can I do this?

Thanks,  
Tushar

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [July 29, 2010, 9:42am UTC](https://www.ruby-forum.com/t/google-map-integration/192325/2 "2010-07-29T09:42:56Z")

</div>

Tushar G. wrote:

> Hi,  
> I am doing a google map integration using “geokit” and “YM4R/GM” plugin.  
> Whenever I am passing the “area name” the it is ,marking that in google  
> map properly.  
> But my client wants whenever user adds the “IT Companies in India” then  
> GMap should mark all locations of india where the companies are located.
> 
> Can anyone tell how can I do this?
> 
> Thanks,  
> Tushar

you must each @company for marked, can do something like this.

@company.each\_with\_index do |company, i|  
@map.center\_zoom\_init([company.latitude, company.longitude], scale) if  
i == 0  
marker = GMarker.new([company.latitude, company.longitude],  
:title =\> “#{company.name}”, :info\_window =\> “#{company.name  
}  
 #{vendor.address}.”)  
@map.overlay\_init(marker)  
end

regards,  
Rifki Fauzi
