Arcgis for javascript 开发学习经验

初始化viewer:

提示:这里简述项目相关背景:

c 复制代码
const mapBaseLayer = new WebTileLayer({
        urlTemplate: SystemConfig.dydImgUrl,
        visible: true,
        id: 'DYDImage',
      });

      //地图初始化map
      const map = new Map({
        basemap: 'satellite',
        ground: 'world-elevation',
        layers: [mapBaseLayer],
      });
            //初始化3D场景
      const view3d = new SceneView({
        container: container,
        map: map,
        //camera: SystemConfig.viewConfig.initCamera,
        qualityProfile: SystemConfig.viewConfig.qualityProfile,
        // viewingMode: SystemConfig.viewConfig.viewModel,
        // clippingArea: SystemConfig.viewConfig.kansasExtent,
        environment: {
          atmosphere: {
            quality: SystemConfig.viewConfig.quality,
          },
          // weather: {
          //   type: 'cloudy', // autocasts as new CloudyWeather()
          // },
          background: {
            type: 'color',
            color: '#03c0fa',
          },
          starsEnabled: false,
          atmosphereEnabled: false,
        },
      });
      view3d.ui.components = [];
      view3d.popup = {
        dockEnabled: false,
        dockOptions: {
          buttonEnabled: false,
          // position: 'bottom-right',
          breakpoint: true,
        },
        collapseEnabled: false, // 移除title点击折叠功能
        spinnerEnabled: false,
        // autoCloseEnabled:true,
        actions: [], // 清空事件按钮 (缩放至、...)
      };
      //地图初始化中心点
      let pt = null;
      pt = SystemConfig.viewConfig.center
        ? new Point({
            x: SystemConfig.viewConfig.center.x,
            y: SystemConfig.viewConfig.center.y,
            spatialReference: SystemConfig.viewConfig.spatialReference,
          })
        : null;

      view3d.when(() => {
        view3d.goTo(
          {
            center: pt,
            zoom: 12.45840402466091,
            tilt: SystemConfig.viewConfig.initCamera.tilt,
            heading: SystemConfig.viewConfig.initCamera.heading,
          },
          {
            duration: 10000,
          },
        );
      });

      window.view = view3d;

      const viewLocal = new SceneView({
        container: null,
        map: map,
        camera: SystemConfig.viewConfig.localCamera,
        qualityProfile: SystemConfig.viewConfig.qualityProfile,
        viewingMode: SystemConfig.viewConfig.viewModel,
        //clippingArea: SystemConfig.viewConfig.kansasExtent,
        environment: {
          atmosphere: {
            quality: SystemConfig.viewConfig.quality,
          },
          weather: {
            type: 'sunny', // autocasts as new CloudyWeather()
          },
          background: {
            type: 'color',
            color: [99, 104, 68, 1],
          },
          starsEnabled: false,
          atmosphereEnabled: false,
        },
      });

      viewLocal.ui.components = [];
      viewLocal.popup = {
        dockOptions: {
          buttonEnabled: false,
        },
        collapseEnabled: false, // 移除title点击折叠功能
        spinnerEnabled: false,
        // autoCloseEnabled:true,
        actions: [], // 清空事件按钮 (缩放至、...)
      };

相关推荐
Mr.L7051713 分钟前
Maui学习笔记- SQLite简单使用案例02添加详情页
笔记·学习·ios·sqlite·c#
2301_8187320637 分钟前
用layui表单,前端页面的样式正常显示,但是表格内无数据显示(数据库连接和获取数据无问题)——已经解决
java·前端·javascript·前端框架·layui·intellij idea
Komorebi゛1 小时前
【uniapp】获取上传视频的md5,适用于APP和H5
前端·javascript·uni-app
林涧泣1 小时前
【Uniapp-Vue3】动态设置页面导航条的样式
前端·javascript·uni-app
杰九1 小时前
【全栈】SprintBoot+vue3迷你商城(10)
开发语言·前端·javascript·vue.js·spring boot
Hopebearer_2 小时前
入门 Canvas:Web 绘图的强大工具
前端·javascript·es6·canva可画
PaLu-LI2 小时前
ORB-SLAM2源码学习:Initializer.cc(13): Initializer::ReconstructF用F矩阵恢复R,t及三维点
c++·人工智能·学习·线性代数·ubuntu·计算机视觉·矩阵
ILUUSION_S2 小时前
Vue平台开发三——项目管理页面
javascript·vue.js
_pengliang3 小时前
react native i18n插值:跨组件trans
javascript·react native·react.js
Trouvaille ~3 小时前
【Linux】命令为桥,存在为岸,穿越虚拟世界的哲学之道
linux·学习·开源·操作系统·编程·命令行·基础入门