下载的官网文件:SuperMap iClient3D 11i (2022) SP1 for WebGL
文件存在vue3中public中
index.html:
<script src="/SuperMap3D/SuperMap3D.js"></script>
<script src="/supermap/SuperMap3D/SuperMap3D-es6.js"></script>
然后页面中编写:
let viewer = new SuperMap3D.Viewer('Container')
viewer.scene.open('http://www.supermapol.com/realspace/services/3D-suofeiya_church/rest/realspace')
成功显示,然后按照SuperMap iClient3D 11i (2022) SP1 for WebGL的文档中例子没法用
例如文档中例子:
viewer.camera.flyTo({
destination : Cartesian3.fromDegrees(-117.16, 32.71, 15000.0)
})
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'flyTo')