Web サイトから Google Earth API をロードするときに開始するビューを設定していますが、このズームイン ビューではなく、スペースから開始してからズームインします。特に私のビューは北から南を見ているため、これは視聴者にとって不安定です。そのため、地球は途中で渦を巻いてい ます。 project3_tungurahua/tungurahua_hazards.html
地図が iframe に読み込まれます。ズーム ビューも変更せずにさまざまな kml を切り替えたいのですが、その質問は別に投稿します。私は答えを探しましたが、これに固有のものは何も見つかりませんでした.これに関する投稿を見逃した場合は、誰かが私を正しい方向に向けることができるかどうかを確認してください.
コードは次のとおりです。
var ge;
google.load("earth", "1");
function init() {
google.earth.createInstance('map3d', initCB, failureCB);
}
function initCB(instance) {
ge = instance;
ge.getWindow().setVisibility(true);
// set navigation controls
ge.getNavigationControl().setVisibility(ge.VISIBILITY_AUTO);
// to fetch a KML file and show it
function finished(object) {
if (!object) {
// wrap alerts in API callbacks and event handlers
// in a setTimeout to prevent deadlock in some browsers
setTimeout(function() {
alert('Bad or null KML.');
}, 0);
return;
}
ge.getFeatures().appendChild(object);
var la = ge.createLookAt('');
la.set(-1.251336, -78.443817, 7000, ge.ALTITUDE_RELATIVE_TO_GROUND,
177, 65, 500);
ge.getView().setAbstractView(la);
}
//var marker = new GMarker(new GLatLng(-1.402002,-78.409471)); // latitude, longitude
// map.addOverlay(marker);
function failureCB(errorCode) {
}
google.setOnLoadCallback(init);
ありがとう!!