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

Moving load_(map_id) functions to Gmaps from window to work with delayed Ajax definitions. #94

Closed walter closed 13 years ago

walter commented 13 years ago

I have tested this manually with non-Ajaxified requests as well as my Ajax circumstances. It works in both cases. I haven't run your Automated tests, because although I didn't see a "here's how you run tests" in your README, etc. Sorry. Also, note that I didn't alter the corresponding coffeescript.

Rather than define load_(map_id) function on window, switching to defining function on Gmaps object in order to work with some situations with Ajax. Also changed Gmaps.loadMaps function to work where the functions are now found.

walter commented 13 years ago

I'm wrapping up work that depends on this. Could you comment on the likelihood of accepting this pull request or achieving the same result with your own code, please? I'm wondering what the timeframe will be like.

It's been great working with Google Maps for Rails. Thanks for the excellent work.

Cheers, Walter

apneadiving commented 13 years ago

Hi Walter,

Thanks for this. Indeed, my workflow here is a bit tricky:

So according to this, one question: do you file like modifying the coffeescript file? If not, I'll do it myself later but I can't merge now: coffee source and js must remain the same.

Cheers,

Ben

walter commented 13 years ago

Thanks the reply. I'll have a go at modifying the coffeescript and get back to you.

Cheers, Walter

On Sep 21, 2011, at 6:41 AM, Benjamin Roth reply@reply.github.com wrote:

Hi Walter,

Thanks for this. Indeed, my workflow here is a bit tricky:

  • I run the Rails 3.1 app in /test/dummy
  • I launch guard as well
  • I've symlinked assets contained at the root of the project in the app dir
  • Any time I update the coffeescript files (dedicated to Rails 3.1), it generates automatically the updated js file (for Rails 3.0).
  • My js tests are made with jasmine simply run rake jasmine in the dummy app

So according to this, one question: do you file like modifying the coffeescript file? If not, I'll do it myself later but I can't merge now: coffee source and js must remain the same.

Cheers,

Ben

Reply to this email directly or view it on GitHub: https://github.com/apneadiving/Google-Maps-for-Rails/pull/94#issuecomment-2148339

walter commented 13 years ago

Ok, I updated the coffee file to have the changes and (and adjusted the commit to gmaps4rails.base.js to match the new coffeescript output).

It still works in my case. Let me know if you need anything more from me.

apneadiving commented 13 years ago

Thanks, will release now.

walter commented 13 years ago

Great. Thanks!