Google map integration

0 views
Skip to first unread message

Tushar Gandhi

unread,
Jul 28, 2010, 4:04:43 AM7/28/10
to rubyonra...@googlegroups.com
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
--
Posted via http://www.ruby-forum.com/.

Rifki Fauzi

unread,
Jul 29, 2010, 3:42:56 AM7/29/10
to rubyonra...@googlegroups.com
Tushar Gandhi 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
}<br/> #{vendor.address}.")
@map.overlay_init(marker)
end

regards,
Rifki Fauzi

Reply all
Reply to author
Forward
0 new messages