使用说明

1、 下载附件 ugis3dmap.txt
2、 修改附件扩展名为zip,并解压文件包;
3、 备份ugis/static/dist/js/ugis3dmap,删除或重命名ugis/static/dist/js/ugis3dmap。(产品中的文件)
4、 拷贝【ugis3dmap.zip】到ugis/static/dist/js/ugis3dmap并解压。
5、 创建UGIS 3D场景,拷贝【地图场景代码注入.js】内容,覆盖场景代码注入,根据需要修改S3M服务url及其他参数,保存代码注入,预览场景。
6、修改地图场景代码注入.js

  1. /**
  2. * @description 3D场景代码注入
  3. **/
  4. function onSceneRender(){
  5. return {
  6. // 场景初始化之前
  7. "env": "run",
  8. // 场景初始化之前
  9. "beforeLoad": function (options) {
  10. options.isEditor = false;
  11. },
  12. // 场景初始化完成
  13. "loaded": function(mapInstance){
  14. const viewer = mapInstance.viewer, scene = viewer.scene;
  15. const s3mUrl = 'http://www.supermapol.com/realspace/services/3D-suofeiya_church/rest/realspace';
  16. scene.open(s3mUrl, undefined, {
  17. autoSetView: true // 是否自动定位
  18. });
  19. }
  20. };
  21. }

修改: const s3mUrl = ‘http://www.supermapol.com/realspace/services/3D-suofeiya_church/rest/realspace’;
为客户现场正式URL地址;

PS:
1、 关闭ugis入场动画,s3m的自动缩放和场景初始相机动画冲突,会导致无法正常加载倾斜摄影数据。
image.png
2、3D场景在s3mUrl 的最后是以 rest/realspace 结尾; image.png