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

Markers custom action Listener #53

Closed kritik closed 13 years ago

kritik commented 13 years ago

How is it possible to add custom action Listener to Markers?

apneadiving commented 13 years ago

Please ask questions on stackoverflow.

Thanks

kritik commented 13 years ago

ok, I did and put an example with example how to add addition data to http://pastie.org/2211074. I think it should be added to the wiki

apneadiving commented 13 years ago

I haven't found any new question tagged gmapsrails on stackoverflow and I have two remarks concerning your code :)

kritik commented 13 years ago

You cannot find because I found the solution myself And what are the remarks to my code?

apneadiving commented 13 years ago

Ok. My 2 remarks are just meant to be sure you keep your life easy:

kritik commented 13 years ago

no, it's done by jquerys on load function. On Jul 14, 2011 4:07 PM, "apneadiving" < reply@reply.github.com> wrote:

Ok. My 2 remarks are just meant to be sure you keep your life easy:

  • I identified the need to pass additional data in the json created, exactly what you need. I'll release soon a new version (which is on the playground branch now) which will allow you to pass a block to the to_gmaps4rails method. This way, you won't need to override the gem anymore.
  • just to be sure: did you add your js within the Gmpas4rails.callback function?

Reply to this email directly or view it on GitHub:

https://github.com/apneadiving/Google-Maps-for-Rails/issues/53#issuecomment-1571321

apneadiving commented 13 years ago

you'd better move your js function then because it's the only way to be SURE the google objects are created.

kritik commented 13 years ago

I tried but was unable to put listener to exact marker. jQuery helped me ;-)

2011/7/14 apneadiving < reply@reply.github.com>

you'd better move your js function then because it's the only way to be SURE the google objects are created.

Reply to this email directly or view it on GitHub:

https://github.com/apneadiving/Google-Maps-for-Rails/issues/53#issuecomment-1572504

Vladimir Krylov http://vladimir.it.cx