Search code examples
ruby-on-railsruby-on-rails-3gmaps4rails

gmaps4rails : HOW do I set map options such as container ID for a directions map?


I have been trying to set my container class and id options for a directions maps without any success... anyone knows how to?

From documentation:

<%= gmaps( :map_options => { :container_class => "foo", :id => "bar", :class => "baz" } %>

<%= gmaps({"direction" => { "data" => { "from" => "Paris, france", "to" => "Toulon, france" } }})
 %>

I tried combining both but it just won't work...

Cheers,

Joel


Solution

  • You only want a single map right?

    In this case:

    <%= gmaps( :map_options => { :container_class => "foo", :id => "bar", :class => "baz" },
               "direction" => { "data" => { "from" => "Paris, france", "to" => "Toulon, france" }}
    ) %>