# 部署

# 基础环境要求

  • 操作系统:window 7 或者 window 10(推荐)
  • Node版本:11+(长期支持版本)

# 下载地图应用

下载地图应用

二维框架程序文件:

   ├── gis_framework                     // 地图框架
   │   ├── api                           // ArcGIS API for JavaScript 包
   │   ├── src                           // 资源
   │   │   ├── browser-message           // 浏览器图标
   │   │   ├── configs                   // 微件配置文件
   │   │   |     ├── eBuffer
   │   │   |     |     └── config.json   // 缓冲微件配置文件
   │   │   |     ├── Elegend
   │   │   |     |     └── config.json   // 图例配置文件
   │   │   |     ├── ETimeline
   │   │   |     |     └── config.json   // 时间轴配置文件
   │   │   |     ├── LayerManager
   │   │   |     |     └── config.json   //图层配置文件
   │   │   |     └── ...
   │   │   ├── images
   │   │   ├── jimu.js
   │   │   ├── libs                      // 第三方库
   │   │   ├── themes                    // 主题相关
   │   │   ├── ths                       // 方法
   │   │   |     ├── proxy
   │   │   |     |    └── proxy.js       // 代理文件
   │   │   |     └── ...
   │   │   |     └── ...
   │   │   ├── widgets                   // 微件
   │   │   |     ├── LayerManager        // 图层列表
   │   │   |     └── ...
   │   │   ├── config.json               // 地图配置文件
   │   │   ├── env.js
   │   │   ├── index.html               // 地图页面
   │   │   ├── interactions.js          // 交互代码
   │   │   └── ...
   │   └── ...
   ├── icons                            // 图标
   ├── public                           // 模板文件
   │   ├── echarts_template             // Echarts 模板
   │   ├── html_template                // HTML 模板
   │   └── ...
   └── ...

# 运行代理

运行:在 gis_framework/src/ths/proxy 目录下,启动 cmd ,运行命令 node proxy.js

# 修改地图应用

# 修改 ArcGIS API 的引用地址

修改 gis_framework/src/env.js 的第61行代码

  apiUrl = '../api',

# 修改地图的代理地址

修改地图配置文件 gis_framework/src/config.json,找到 httpProxy 下的 url,修改为代理的地址

  "httpProxy": {
    "alwaysUseProxy": false,
    "rules": [
      {
        "urlPrefix": "http://192.168.0.183:7080/",
        "proxyUrl": "/src/proxy/proxy.jsp"
      }
    ],
    "useProxy": true,
    "url": "http://121.46.19.2:20724/thsmap/proxy"
  }