I copy the codes from Google Earth API Developer's Guide,deployed in eclipse's Dynamic Web Project,just like below.
<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>
The website shows red frame but the earth does't exist,what wrong with with my code,thanks!!