apneadiving / Google-Maps-for-Rails

Enables easy Google map + overlays creation in Ruby apps
https://apneadiving.github.io/
MIT License
2.26k stars 382 forks source link

yield :scripts multiple include js maps #260

Closed bl4d3 closed 12 years ago

bl4d3 commented 12 years ago

Hi, I'm under rails 3.2.1 with the latest versione of the gem I can't figure out why the gmap script is yielded two time by

<%= yield :scripts %>

in my page i render 2 maps in this way

<%= gmaps4rails(user_business.to_gmaps4rails) %>

when there is just one map to show always works fine but when there is more then one this is rendered in my html, this is fine but the scripts are included 2 times....any work around?

bl4d3 commented 12 years ago

RTFM https://github.com/apneadiving/Google-Maps-for-Rails/wiki/%28Multiple%29-Maps

apneadiving commented 12 years ago

As explained in the doc, you have additionnal arguments to pass when you want multiple maps.

So you can't use the gmaps4rails helper, you have to use gmaps.

Sent from my iPhone

On 4 sept. 2012, at 09:38, Mattia Lipreri notifications@github.com wrote:

RTFM https://github.com/apneadiving/Google-Maps-for-Rails/wiki/%28Multiple%29-Maps

— Reply to this email directly or view it on GitHub.