以下のように、Eclipseの動的WebプロジェクトにデプロイされたGoogle Earth API Developer's Guideからコードをコピーします。
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Sample</title>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
var ge;
google.load("earth","1");
function init(){
google.earth.createInstance('map3d',initCB,failureCB);
}
function initCB(instance){
ge=instance;
ge.getWindow().setVisibility(true);
ge.getNavigationControl().setVisibility(ge.VISIBILITY_SHOW);
}
function failureCB(errorCode){
alert("failure");
}
google.setOnloadCallback(init);
</script>
</head>
<body>
<div id="map3d" style="height:400px;width:600px;border:1px solid red"></div>
</body>
ウェブサイトには赤いフレームが表示されますが、地球は存在しません。私のコードの何が問題なのか、ありがとう!!