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…

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

How can I fetch at runtime?