diff --git a/public/geowin3d/map/Geowin3DAPP.js b/public/geowin3d/map/Geowin3DAPP.js index 59c36d7..e9baae3 100644 --- a/public/geowin3d/map/Geowin3DAPP.js +++ b/public/geowin3d/map/Geowin3DAPP.js @@ -88,7 +88,11 @@ Geowin3DAPP.prototype.loadGLTF = function (options) { var that = this; model.readyPromise.then(function(model){ - that._viewer.flyTo(model); + boundingSphere = model.boundingSphere; + + that._viewer.camera.viewBoundingSphere(boundingSphere); + that._viewer.camera.lookAtTransform(Geowin3D.Matrix4.IDENTITY); + // that._viewer.flyTo(model); }).otherwise(function(error){ console.log("模型加载失败:"+error); }) diff --git a/src/views/maps.vue b/src/views/maps.vue index c130345..428c8de 100644 --- a/src/views/maps.vue +++ b/src/views/maps.vue @@ -276,7 +276,7 @@ export default { removeLayer(treeNode) { var id = treeNode.id; if (this.layerManager[id] == null) return; - if (treeNode.type == "tileset" || treeNode.type == "geowintms" || treeNode.type == "tms" || treeNode.type == "knowntms") { + if (treeNode.type == "tileset" || treeNode.type == "geowintms" || treeNode.type == "tms" || treeNode.type == "knowntms" || treeNode.type == "gltf") { geoapp.hide(this.layerManager[id].layer); return; }