首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

googlemap信息窗口大小能自定义吗

2013-01-04 
google地图信息窗口大小能自定义吗?在网页中添加了一个google地图,但地图中默认的信息窗口太大了,怎样才能

google地图信息窗口大小能自定义吗?
在网页中添加了一个google地图,但地图中默认的信息窗口太大了,怎样才能自定义信息窗口大小?
[解决办法]
<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Google Maps JavaScript API Example</title>
    <script src="http://ditu.google.cn/maps?file=api&amp;v=2&amp;key=abcdefg&sensor=true_or_false"
            type="text/javascript"></script>
    <script type="text/javascript">

    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(39.9493, 116.3975), 13);
      }
    }

    </script>
  </head>
  <body onload="initialize()" onunload="GUnload()">
    <div id="map_canvas" style="width: 500px; height: 300px"></div>
  </body>
</html>


这个不是设置大小吗/
[解决办法]
maker.openInfoWindowsHtml("DIV id="openwindow">测试</DIV>)
这样应该可以吧,css里指定DIV的大小!没试过,呵呵!

热点排行