マップをブラウザウィンドウいっぱいに表示する

説明

マップをブラウザウィンドウいっぱいに表示するにはスタイルシートでhtml, body, 表示するマップオブジェクトのスタイルシートのwidth, heightを100%に設定します。ブラウザのスクロールバーを表示させたくない場合にはhtmlにoverflow:hiddenを指定します。
逆引きGoogle Maps APIリファレンス  詳しい解説などは逆引きGoogle Maps APIリファレンス、またはGoogle Maps APIリファレンスを参照してください。

サンプルコード [実行]

<!DOCTYPE html PUBLIC "-//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>Sample</title>
<style type="text/css"><!--
html, body, #gmap {
margin:0;
padding:0;
width:100%;
height:100%;
}
html {
overflow:hidden;
}
--></style>
<script src="http://maps.google.com/maps?file=api&v=1&key=ABQIAAAAasAJryKxWJnBFVJa487d9hTHGAxTVT7IRADYa-JdYz7xQ8IQZBSthgDZdggYpQHsmm6WYtHstQFfLA" type="text/javascript"></script>
</head>
<body>
<div id="gmap"></div>
<script type="text/javascript">
//<![CDATA[
map = new GMap(document.getElementById("gmap"));
map.centerAndZoom(new GPoint(137, 36), 11);
//]]>
</script>
</body>
</html>