我在加载3d文件时遇到问题,详细代码如下,谁能帮我检查为什么我无法加载3d模型。
函数加载3D(){
// 地标
var placemark = ge.createPlacemark('');
placemark.setName('模型');
// 地标/模型(几何)
变种模型 = ge.createModel('');
// 地标/模型/链接
var link = ge.createLink('');
link.setHref('D:/gooleEarthApplication/gooleEarthApplication/3Dsrc/bankright1.dae');
模型.setLink(链接);
// 获取中心位置
// 地标/模型/位置
var loc = ge.createLocation('');
loc.setLatitude(30.55423190570);
loc.setLongitude(114.33491353925);
模型.setLocation(loc);
// 将模型地标添加到地球
placemark.setGeometry(模型);
ge.getFeatures().appendChild(地标);
var lookAt = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);
lookAt.setRange(lookAt.getRange() / 20000.0);
// 设置纬度和经度值
lookAt.setLatitude(30.55423190570);
看看.setLongitude(114.33491353925);
//放大模型
看.setRange(300);
看.setTilt(80);
ge.getView().setAbstractView(lookAt);
}