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

相关推荐
boooooooom11 小时前
手把手做一个图 RAG 烹饪问答系统:Neo4j + Milvus + LLM 的工程实践
前端·javascript·后端
染指111014 小时前
103.RAG-LLamaIndex后端rag问答-聊天接口
前端·javascript·vue.js·人工智能
y = xⁿ21 小时前
DeepSeek Harness 学习日记:关于Agent接口,工具调用的底层实现
android·java·学习
单线程_011 天前
从案例分析 Vue3 Tokenizer+Parser 源码三
前端·javascript·vue.js
小磊哥er1 天前
深入解构Claude Code - 第 8 篇 · 数据放哪、钱怎么算
javascript·ai编程
HugoStudio_SWAN1 天前
【擦除重绘】C++ 控制台动画:弹跳 Logo DVD 屏保效果
开发语言·c++·学习·程序人生
kyriewen1 天前
我装了30多个Skill,给AI安排了8个岗位
前端·javascript·ai编程
sakiko_1 天前
Swift学习笔记42-SwiftUI的属性包装器(讲解+面试)
笔记·学习·ios·swiftui·swift
默_笙1 天前
🔥 让 AI 帮我写完整个 Next.js 博客:框架就是 AI 的"上下文 buff"
前端·javascript
存在morning1 天前
【Paimon 学习笔记 三】工作流程:Paimon 的批写、流写、批读与流读
笔记·学习