Google Maps: How to display infoWindow with Ajax?

I have different restaurant makers on maps.
When I click one marker, it is supposed to show restaurant name and
address after fetching from server at run time.

Currently I am doing this…
restaurant#{restaurant.id}marker.openInfoWindowHtml("#{restaurant.name}");

It is a problem when there are so many restaurants in map.

How can I fetch at runtime?

Thanks.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs