0

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...

4

1 回答 1

1

将 html 代码添加到您的信息窗口以应用如下样式:

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

infowindow.setContent(contentString);

注意:刚刚使用了一些 html 标签来展示示例。根据您的要求进行更改。

于 2013-09-04T17:26:00.710 回答