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

Infoview/infobox event listeners #89

Closed eetteri closed 13 years ago

eetteri commented 13 years ago

Currently there seems to be no way to set the infobox's event listeners as they need to be added at creation time. Do you see it feasible that the options to do it could be added to custom marker's option block. Something along the lines

<%= gmaps("markers" => {"data" => @json, "options" => {"info_view_callbacks" => {"domready" => "loadPlayer", "closeclick" => "superbCloseMethod"} } }) %>
apneadiving commented 13 years ago

I'd prefer to avoid this. I could simply store the infowindow object so it would be accessible and customizable.

eetteri commented 13 years ago

Yeah, that would be cleaner. To access info window methods and events one could then use the Gmaps.callback and access each markers info window that way. +1 for that :)

apneadiving commented 13 years ago

see here hor doc: https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Map-Apis

Wanna release soon 1.1.5