Hmm, I don't see an obvious cause for the problem. I would chuck in a
debug on @map and perhaps marker objects to see what they look like.

One difference that my code has (in the controller where @map object
is initialized) is that it uses this:

@map.center_zoom_on_points_init(*...@coordinates_for_results)

I would say that implies that it can handle multiple markers, but if
it is what turns on support for multiple markers it's pretty
unexpected.

Hope this helps,
Walter


On Mon, Sep 20, 2010 at 7:49 PM, Twistter Shock <li...@ruby-forum.com> wrote:
> Walter McGinnis wrote:
>> Just a quick link to some example code that may help you:
>>
>> http://github.com/kete/kete/blob/master/app/views/search/_results.rhtml
>> # lines 43 - 63ish
>>
>> Pay particular attention to lines 61 and 62.
>>
>> Hope that helps,
>> Walter
>
> Hi Walter, thanks for your reply
>
> My original code were like this post, with it, only show the last result
> of my query, like this:
>
>
>     @map = GMap.new("map_div_id")
>     @map.control_init(:large_map => true, :map_type => true)
>     @map.center_zoom_init([40.41,-3.70], 4)
>
>     for lab in @laboratories do
>         html = gethtmlmap(lab)
>         c1, c2 = lab.coords.split(",")
>
>          marker = GMarker.new([c1.to_i,c2.to_i],
>         :title => lab.name, :info_window => html)
>         �...@map.overlay_init(marker)
>     end
>
> I don't know what is wrong.
>
> Thanks!
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to