jxdnsong
2020-10-24 650acd89dcfc13c9dd051dd2ab29845c748df9d3
新增右键菜单部件,但测试发现sdk还有问题
1 files modified
7 files added
280 ■■■■■ changed files
config.json 169 ●●●●● patch | view | raw | blame | history
widgets/ContextMenu/Widget.html 3 ●●●●● patch | view | raw | blame | history
widgets/ContextMenu/Widget.js 58 ●●●●● patch | view | raw | blame | history
widgets/ContextMenu/css/style.css patch | view | raw | blame | history
widgets/ContextMenu/manifest.json 17 ●●●●● patch | view | raw | blame | history
widgets/ContextMenu/nls/es/strings.js 13 ●●●●● patch | view | raw | blame | history
widgets/ContextMenu/nls/strings.js 7 ●●●●● patch | view | raw | blame | history
widgets/ContextMenu/nls/zh-cn/strings.js 13 ●●●●● patch | view | raw | blame | history
config.json
@@ -13,10 +13,9 @@
    ],
    "version": "2.10"
  },
  "modeUrl": "http://www.sw797.com:801/gzsw3D/v2/data/mx/",
  "cesiumToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2ODUxMWQxMC1lNzZjLTRhZjktYmZiMS1lNWFmYWJkZWIwOTEiLCJpZCI6MTQxNzMsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NjQ5Njg5NzV9.ojKhhmjl8L0EtxsZC14LZgmXn5VVS0CRBCYuRK_DdIo",
  "authorizedCrossOriginDomains": [],
  "title": "水文水生态综合信息管理平台",
  "title": "虚拟地理环境三维平台",
  "subtitle": "",
  "keepAppState": true,
  "logo": "images/app-logo.png",
@@ -75,6 +74,10 @@
          "height": "auto",
          "relativeTo": "map"
        }
      },
      {
        "name": "右键菜单",
        "uri": "widgets/ContextMenu/Widget"
      }
    ],
    "groups": [],
@@ -94,154 +97,6 @@
      "right": 0,
      "bottom": 0
    },
    "basemaps": [
      {
        "label": "行政区划",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/jctczt/MapServer",
        "layers": "0",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      },
      {
        "label": "河流水系",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/jctczt/MapServer",
        "layers": "1",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      },
      {
        "label": "铁路公路",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/jctczt/MapServer",
        "layers": "2",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      },
      {
        "label": "高速公路",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/jctczt/MapServer",
        "layers": "3",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      }
    ],
    "swzwLayers": [
      {
        "label": "水文站",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/swzwzt/MapServer",
        "layers": "0",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      },
      {
        "label": "水位站",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/swzwzt/MapServer",
        "layers": "1",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      },
      {
        "label": "雨量站",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/swzwzt/MapServer",
        "layers": "2",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      },
      {
        "label": "水质站",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/swzwzt/MapServer",
        "layers": "3",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      },
      {
        "label": "中小河流站",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/swzwzt/MapServer",
        "layers": "4",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      },
      {
        "label": "水库水位站",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/jctczt/MapServer",
        "layers": "2",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      }
    ],
    "shLayers": [
      {
        "label": "山洪隐患点",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/shskzt/MapServer",
        "layers": "0",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      },
      {
        "label": "大型水库",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/shskzt/MapServer",
        "layers": "1",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      },
      {
        "label": "中型水库",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/shskzt/MapServer",
        "layers": "2",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      },
      {
        "label": "小型水库",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/shskzt/MapServer",
        "layers": "3",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      }
    ],
    "djyLayers": [
      {
        "label": "东江源区水系图",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/djysx/MapServer",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      },
      {
        "label": "水文监测基本站网",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/djyswjcjbzw/MapServer",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      },
      {
        "label": "专项分析研究实验站网",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/djyztfxsyzw/MapServer",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      },
      {
        "label": "遥测站点",
        "url": "http://171.35.109.175:18080/arcgis/rest/services/GZSW/djyyczw/MapServer",
        "type": "arcgis",
        "icon": "images/basemaps/tiandituimage.png",
        "show": false
      }
    ],
    "imageryProviderViewModels": [
      {
        "name": "天地图影像",
@@ -325,20 +180,6 @@
            "url": "http://www.sw797.com:801/gzsw3D/v2/data/wp/{z}/{x}/{y}.png"
          }
        ]
      }
    ],
    "terrainProviderViewModels": [
      {
        "name": "无地形",
        "tooltip": "WGS84标准球体",
        "iconUrl": "images/basemaps/TerrainEllipsoid.png",
        "url": ""
      },
      {
        "name": "赣州地形",
        "tooltip": "由 普适科技 提供的赣州地形",
        "iconUrl": "images/basemaps/TerrainSTK.png",
        "url": "http://www.sw797.com:801/gzsw3D/v2/data/gzdx"
      }
    ],
    "mapOptions": {
widgets/ContextMenu/Widget.html
New file
@@ -0,0 +1,3 @@
<div>
</div>
widgets/ContextMenu/Widget.js
New file
@@ -0,0 +1,58 @@
/*
 * @Descripttion: 右键菜单部件
 * @version:
 * @Author: song
 * @Date: 2020-10-24 08:57:47
 * @LastEditors: song
 * @LastEditTime: 2020-10-24 09:11:19
 */
define([
        'dojo/_base/declare',
        'jimu/BaseWidget'
    ],
    function (
        declare,
        BaseWidget
    ) {
        return declare([BaseWidget], {
            baseClass: 'jimu-widget-ContextMenu',
            name: 'ContextMenu',
            layers:{},
            startup: function () {
                this.inherited(arguments);
                let contextMenu = window.dcViewer.contextMenu
                contextMenu.enable = true
                contextMenu.addMenuItem('测试', () => {}, this)
            },
            onOpen: function () {
                //面板打开的时候触发 (when open this panel trigger)
            },
            onClose: function () {
                //面板关闭的时候触发 (when this panel is closed trigger)
            },
            onMinimize: function () {
                this.resize();
            },
            onMaximize: function () {
                this.resize();
            },
            resize: function () {
            },
            destroy: function () {
                //销毁的时候触发
                //todo
                //do something before this func
                this.inherited(arguments);
            }
        });
    });
widgets/ContextMenu/css/style.css
widgets/ContextMenu/manifest.json
New file
@@ -0,0 +1,17 @@
{
  "name": "ContextMenu",
  "2D": true,
  "3D": true,
  "platform": "HTML",
  "version": "2.10",
  "wabVersion": "2.10",
  "author": "",
  "description": "",
  "copyright": "",
  "license": "",
  "properties": {
    "hasConfig": false,
    "inPanel": false,
    "hasVersionManager": false
  }
}
widgets/ContextMenu/nls/es/strings.js
New file
@@ -0,0 +1,13 @@
/*
 * @Descripttion:
 * @version:
 * @Author: song
 * @Date: 2020-10-24 08:57:47
 * @LastEditors: song
 * @LastEditTime: 2020-10-24 09:01:01
 */
define(
   ({
    _widgetLabel: "ContextMenu"
  })
);
widgets/ContextMenu/nls/strings.js
New file
@@ -0,0 +1,7 @@
define({
  root: ({
    _widgetLabel: "Basemap"
  }),
  "es": 1,
  "zh-cn": 1
});
widgets/ContextMenu/nls/zh-cn/strings.js
New file
@@ -0,0 +1,13 @@
/*
 * @Descripttion:
 * @version:
 * @Author: song
 * @Date: 2020-10-24 08:57:47
 * @LastEditors: song
 * @LastEditTime: 2020-10-24 09:00:53
 */
define(
   ({
    _widgetLabel: "右键菜单"
  })
);