Hello,
Congratulations! You''ve got first post!
One thing you need to do is to set a size for the div that contains the map
(in your case "map_div"). Personnally I usually set it inside the CSS.
You
can also set it by calling somewhere:
@map.header_width_height(yourwidth,yourheight)
which will output a CSS style fragment with the width and height. You can
also set it when calling @map.div by passing the options :width and :height
with the values that you want.
guilhem
On 7/26/06, Mike Pence <mike.pence at gmail.com>
wrote:>
> Hey all,
>
> I''m a little frustrated here. The controls for the Google Map show
up,
> but the map itself seems to either never appear or to briefly flicker
> onto screen, then to disappear.
>
> My controller is simply this:
>
> @map = GMap.new("map_div")
> @map.control_init(:large_map => true, :map_type => true)
> @map.center_zoom_init([0, 0], 6)
>
> and my view is this:
>
> <head>
> <%= javascript_include_tag :defaults %>
> <%= GMap.header %>
> <%= @map.to_html %>
> </head>
> <body>
> <h2>Map should be below</h2>
> <%= @map.div %>
> </body>
>
> Any help greatly appreciated.
>
> Mike Pence
> _______________________________________________
> Ym4r-user mailing list
> Ym4r-user at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ym4r-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/ym4r-user/attachments/20060726/1f615e30/attachment.html