当前位置: 首页 > article >正文

Arcgis for javascript 开发学习经验

初始化viewer:

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

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: [], // 清空事件按钮 (缩放至、...)
      };


http://www.kler.cn/a/444841.html

相关文章:

  • 虚拟机断网没有网络,需清理内存,删除后再重启
  • MySQL中EXPLAIN详细讲解
  • 安装opnet14.5遇到的问题
  • Anaconda3 pypi 清华大学TUNA镜像源使用帮助
  • 从源码分析swift GCD_DispatchGroup
  • 青少年编程与数学 02-004 Go语言Web编程 02课题、依赖管理
  • 相机主要调试参数
  • LDO输入电压不满足最小压差时输出会怎样?
  • uboot, s5pv210, 内存讲解(3)
  • 【Nginx-4】Nginx负载均衡策略详解
  • 在Windows下安装redis
  • Python知识分享第三十一天-Numpy和Pnadas入门
  • 林子雨-大数据课程实验报告(二)
  • 气象与旅游之间的关系,如果借助高精度预测提高旅游的质量
  • 安徽移动携手开源网安亮相2024中国国际车联网技术大会,共筑车联网安全新壁垒
  • 无人设备遥控器之通讯技术篇
  • 技术速递|.NET 9 简介
  • 计算机基础 试题
  • 【C++】sophus : sim_details.hpp 实现了矩阵函数 W、其导数,以及其逆 (十七)
  • 划分WLAN的三种主要方法,基于WLAN,基于IP,基于端口
  • [HNCTF 2022 Week1]你想学密码吗?
  • Vue与React:前端框架的巅峰对决
  • 【HarmonyOS】获取设备自定义名字
  • [oeasy]python054_python有哪些关键字_keyword_list_列表_reserved_words
  • 【进程篇】理解进程
  • ARM嵌入式学习--第八天(PWM)