seb
seb

Reputation: 313

InfoWindows on google map

Does i can do that kind of google infoWindows with the infoWindows function from google map api 3 when i click on the marker ?

http://i40.tinypic.com/25unplc.png

var infowindow = new google.maps.InfoWindow({
  content:"Hello World!"
  });

google.maps.event.addListener(marker, 'click', function() {
  infowindow.open(map,marker);
  });

I am not even able to do a line break in those information windows...

Upvotes: 0

Views: 320

Answers (1)

Kiran
Kiran

Reputation: 20293

Add html code to your infowindow to apply styles like:

var contentString = '<div id="content">'+
        '<h2>Meta Creation</h2><br/>'+
        '<div id="bodyContent">'+
        '&nbsp;&nbsp;&nbsp;'+
        '</div>'+
        '</div>';

infowindow.setContent(contentString);

NOTE: Just used some of the html tags to show example. Change according to your requirement.

Upvotes: 1

Related Questions