平移模型
可视域分析需要额外调用接口,需要引用插件 ViewshedAnalysis.js 和 ViewshedAnalysis.css
HTML
<link href="SDK/Plugins/EditBoxGeometry/EditBoxGeometry.css"/>
<script src="SDK/Plugins/EditBoxGeometry/EditBoxGeometry.js"></script>
平移模型
JavaScript
viewer.extend(LSGlobe.viewerEditBoxGeometryMixin);
viewer.boxEditBoxGeometry.viewModel.editerVisible = false;
var tileset;
tileset = new LSGlobe.Cesium3DTileset({
url: 'Datas/build2/tileset.json'
});
viewer.scene.primitives.add(tileset);
tileset.readyPromise.then(function (tileset) {
var boundingSphere = tileset.boundingSphere;
viewer.camera.viewBoundingSphere(boundingSphere, new LSGlobe.HeadingPitchRange(0, -2.0, 0));
viewer.camera.lookAtTransform(LSGlobe.Matrix4.IDENTITY);
viewer.boxEditBoxGeometry.viewModel.editObject = tileset;
viewer.boxEditBoxGeometry.viewModel.all();
});