我想知道如何在 Gmaps4Rails.infobox 打开的信息框中加载 Rails 视图。
问问题
449 次
1 回答
1
I did this way and work fine. O secret is put serviceObject, in some example show google_object.
<% content_for :scripts do %>
<script>
Gmaps4Rails.callback = function() {
for (var i = 0; i < this.markers.length; ++i) {
google.maps.event.addListener(Gmaps4Rails.markers[i].serviceObject, 'click', function(){
$('#info').load('/messages');
$('#info').dialog("open");
});
}
};
</script>
<% end %>
于 2011-07-15T20:07:46.537 回答