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

Initialize the map after an ajax request #110

Closed joeytheman closed 12 years ago

joeytheman commented 12 years ago

How would I initialize the map after a rails ajax request? I looked through the wiki and did not see the js command. Thanks

apneadiving commented 12 years ago

please ask questions on stackoverflow.

BTW, this should answer: http://stackoverflow.com/questions/7735054/gmaps4rails-on-jquerymobile-dont-work

joeytheman commented 12 years ago

could the js files from the link be moved to a helper function in case they change in the future?

apneadiving commented 12 years ago

Well third party files could be moved within a helper, but because of the asset pipeline I think it's unnecessary for the gem's js.

joeytheman commented 12 years ago

Yea, I was referring to the third party files like the ones below being added to a single helper function for the script tags that can be added to a view.

script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3.5&sensor=false&libraries=geometry"> script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/infobox/1.1.5/src/infobox.js"> script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.1/src/markerclusterer.js"> script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/richmarker/src/richmarker-compiled.js">