Search code examples
ruby-on-railsrubyruby-on-rails-3google-mapsgmaps4rails

Gmaps4rails : Setting map width and height


Reading the gmaps4rails gem documentation, I didn't find any way to set the map width and height. Is there any way to do this ?


Solution

  • I should have given further details about this.

    I'll make an installation rake task to copy css and javascript in the Rails app.

    Well, for now, simply override this in your css (I assume you didn't change the map id).

    #gmaps4rails_map {
      width: 800px;
      height: 400px;
    }
    

    If you want it to work, beware to include your css after the yield(:head)

    <%= yield :head %>
    <%= stylesheet_link_tag "your css" %>