I\'m using gmaps4rails to load a map on a \"clients\" show page. I\'ve integrated turbolinks to make the app speadier all together, but now I\'m hitting an issue where I hav
I had trouble filling the map canvas on revisits to pages already managed by turbolinks, especially when using the back button. I fixed the issue by adding a listener, for the turbolinks event page:load
, to map initialization.
map.js.coffee
google.maps.event.addDomListener(window, 'load', @_setup)
google.maps.event.addDomListener(window, 'page:load', @_setup)
application.js.coffee
//= require jquery
//= require jquery.turbolinks