Merge branch 'master' of http://192.168.0.105:10010/r/pyhmap
| | |
| | | "position": { |
| | | "right": 96, |
| | | "top": 20, |
| | | "height": "32px", |
| | | "height": "36px", |
| | | "width": "86px", |
| | | "relativeTo": "map" |
| | | } |
| | |
| | | "position": { |
| | | "right": 10, |
| | | "top": 20, |
| | | "height": "32px", |
| | | "height": "36px", |
| | | "width": "86px", |
| | | "relativeTo": "map" |
| | | } |
| | |
| | | "position": { |
| | | "right": 10, |
| | | "top": 96, |
| | | "width": "400px", |
| | | "width": "472px", |
| | | "height": "50px", |
| | | "relativeTo": "map" |
| | | } |
| | |
| | | } |
| | | }, |
| | | "map": { |
| | | "3D": true, |
| | | "2D": false, |
| | | "3D": false, |
| | | "2D": true, |
| | | "position": { |
| | | "left": 0, |
| | | "top": 0, |
| | |
| | | .jimu-widget-Basemap { |
| | | position: relative; |
| | | font-size: 14px; |
| | | height: 32px; |
| | | line-height: 32px; |
| | | height: 36px; |
| | | line-height: 36px; |
| | | width: 100%; |
| | | background: rgba(255, 255, 255, 0.75); |
| | | color: #000; |
| | | background: rgb(254, 254, 254); |
| | | color: #838383; |
| | | border-radius: 0 6px 6px 0; |
| | | text-align: center; |
| | | cursor: pointer; |
| | |
| | | { |
| | | "date": "2020-09-12 08:53:28", |
| | | "hasChildren": true, |
| | | "icon": "http://www.sw797.com:801/gzsw3D/v2/images/icon/mrtc.png", |
| | | "icon": "http://www.sw797.com:10011/gzsw3D/v2/images/icon/mrtc.png", |
| | | "id": "1", |
| | | "isCheck": "1", |
| | | "isDisable": "1", |
| | |
| | | { |
| | | "date": "2020-09-12 08:53:28", |
| | | "hasChildren": true, |
| | | "icon": "http://www.sw797.com:801/gzsw3D/v2/images/icon/mrtc.png", |
| | | "icon": "http://www.sw797.com:10011/gzsw3D/v2/images/icon/mrtc.png", |
| | | "id": "5", |
| | | "isCheck": "1", |
| | | "isDisable": "1", |
| | |
| | | },{ |
| | | "date": "2020-09-12 08:53:28", |
| | | "hasChildren": true, |
| | | "icon": "http://www.sw797.com:801/gzsw3D/v2/images/icon/mrtc.png", |
| | | "icon": "http://www.sw797.com:10011/gzsw3D/v2/images/icon/mrtc.png", |
| | | "id": "9", |
| | | "isCheck": "1", |
| | | "isDisable": "1", |
| | |
| | | // 模块描述:显示坐标 |
| | | /////////////////////////////////////////////////////////////////////////// |
| | | define([ |
| | | 'dojo/_base/declare', |
| | | 'dojo/_base/lang', |
| | | 'dojo/_base/array', |
| | | 'dojo/_base/html', |
| | | 'dojo/topic', |
| | | 'jimu/BaseWidget', |
| | | 'jimu/utils', |
| | | 'jimu/css!libs/zTree_v3/css/zTreeStyle/zTreeStyle.css', |
| | | 'libs/zTree_v3/js/jquery.ztree.all' |
| | | ], |
| | | 'dojo/_base/declare', |
| | | 'dojo/_base/lang', |
| | | 'dojo/_base/array', |
| | | 'dojo/_base/html', |
| | | 'dojo/topic', |
| | | 'jimu/BaseWidget', |
| | | 'jimu/utils', |
| | | 'jimu/css!libs/zTree_v3/css/zTreeStyle/zTreeStyle.css', |
| | | 'libs/zTree_v3/js/jquery.ztree.all' |
| | | ], |
| | | function (declare, |
| | | lang, |
| | | array, |
| | |
| | | $('.left-navigation-bar-but').click(() => { |
| | | this.changeImg = !this.changeImg; |
| | | if (this.changeImg) { |
| | | $('.l-n-b-b-img').attr("src", "../../images/addL/xzuo.png");//打开 |
| | | $('.jimu-widget-LeftNavigationBar').css({ 'left': '0px' }); |
| | | $('.jimu-widget-instructions').css({ 'left': '260px' }); |
| | | $('.l-n-b-b-img').attr("src", "../../images/addL/xzuo.png"); //打开 |
| | | $('.jimu-widget-LeftNavigationBar').css({ |
| | | 'left': '0px' |
| | | }); |
| | | $('.jimu-widget-instructions').css({ |
| | | 'left': '260px' |
| | | }); |
| | | } else { |
| | | $('.l-n-b-b-img').attr("src", "../../images/addL/xyou.png");//关闭 |
| | | $('.jimu-widget-LeftNavigationBar').css({ 'left': '-250px' }); |
| | | $('.jimu-widget-instructions').css({ 'left': '10px' }); |
| | | $('.l-n-b-b-img').attr("src", "../../images/addL/xyou.png"); //关闭 |
| | | $('.jimu-widget-LeftNavigationBar').css({ |
| | | 'left': '-250px' |
| | | }); |
| | | $('.jimu-widget-instructions').css({ |
| | | 'left': '10px' |
| | | }); |
| | | } |
| | | }) |
| | | |
| | | |
| | | $('.jimu-widget-instructions').css({ 'left': '260px' }); |
| | | $('#left-navigation-bar-main-search').click(() => {//搜索事件 |
| | | $('.jimu-widget-instructions').css({ |
| | | 'left': '260px' |
| | | }); |
| | | $('#left-navigation-bar-main-search').click(() => { //搜索事件 |
| | | var val = $('#left-navigation-bar-main-input').val(); |
| | | if (val) { |
| | | var clearOur = () => { |
| | | let dom = $(`[data-id]`); |
| | | // console.log(dom); |
| | | dom.removeClass('layui-tree-spread'); |
| | | let domDiv = dom.find('.layui-tree-pack'); |
| | | domDiv.css({ 'display': 'none' }) |
| | | } |
| | | , a |
| | | , useit = (d) => { |
| | | let dom = $(`[data-id]`); |
| | | // console.log(dom); |
| | | dom.removeClass('layui-tree-spread'); |
| | | let domDiv = dom.find('.layui-tree-pack'); |
| | | domDiv.css({ |
| | | 'display': 'none' |
| | | }) |
| | | }, |
| | | a, useit = (d) => { |
| | | for (var k in d) { |
| | | if (d[k].who == 'father') { |
| | | that.father = d[k].id; |
| | | } |
| | | if (d[k].title.indexOf(val) != -1) {//选中id |
| | | if (d[k].title.indexOf(val) != -1) { //选中id |
| | | a = '' + d[k].id; |
| | | // var b = a.split(''); |
| | | // for (var i in b) { |
| | | let id = that.father;//选中项的所有父级id |
| | | let id = that.father; //选中项的所有父级id |
| | | // // console.log(id) |
| | | let dom = $(`[data-id='${id}']`); |
| | | dom.addClass('layui-tree-spread'); |
| | | let domDiv = dom.find('.layui-tree-pack').eq(0); |
| | | domDiv.css({ 'display': 'block' }) |
| | | domDiv.css({ |
| | | 'display': 'block' |
| | | }) |
| | | // } |
| | | console.log(a, that.father) |
| | | } |
| | |
| | | }) |
| | | }, |
| | | |
| | | closeToolBox: function (item) { |
| | | }, |
| | | closeToolBox: function (item) {}, |
| | | |
| | | onOpen: function () { |
| | | //面板打开的时候触发 (when open this panel trigger) |
| | |
| | | |
| | | }, |
| | | getData: function () { |
| | | var url = 'http://171.34.76.171:8880/zhsd-wetResource/GeoData/queryGeoDataTree' |
| | | , that = this; |
| | | var url = 'http://171.34.76.171:8880/zhsd-wetResource/GeoData/queryGeoDataTree', |
| | | that = this; |
| | | |
| | | axios.get(url, { |
| | | headers: { |
| | |
| | | } |
| | | }).then((res) => { |
| | | if (res.data.code == '200') { |
| | | that.changeData(res.data.data);//重写数据 |
| | | console.log(res, 'open', 898998) |
| | | that.changeData(res.data.data); //重写数据 |
| | | } |
| | | }) |
| | | }, |
| | | changeData: function (val) {//重写数据 |
| | | changeData: function (val) { //重写数据 |
| | | var data = [], |
| | | i = 1, |
| | | inits = (d, childData) => { |
| | |
| | | // id: d[k].id, |
| | | // field: String(d[k].id), |
| | | id: i, |
| | | field: String(i) |
| | | field: String(i), |
| | | src: d[k].serviceUrl, |
| | | id: d[k].id, |
| | | serviceName: d[k].serviceName |
| | | } |
| | | b.push(a); |
| | | i++; |
| | |
| | | begin: function (data) { |
| | | var that = this; |
| | | |
| | | var a = null; |
| | | |
| | | layui.use(function () { |
| | | var tree = layui.tree |
| | | , layer = layui.layer |
| | | , util = layui.util |
| | | , $ = layui.$; |
| | | var tree = layui.tree, |
| | | layer = layui.layer, |
| | | util = layui.util, |
| | | $ = layui.$; |
| | | tree.render({ |
| | | elem: '#test1' //默认是点击节点可进行收缩 |
| | | , data: data |
| | | , id: 'demoId1' |
| | | , showCheckbox: true //是否显示复选框 |
| | | , click: function (obj) { |
| | | var data = obj.data; //获取当前点击的节点数据 |
| | | , |
| | | data: data, |
| | | id: 'demoId1', |
| | | showCheckbox: true //是否显示复选框 |
| | | , |
| | | click: function (obj) { |
| | | var data = obj.data; //获取当前点击的节点数据 |
| | | // layer.msg('状态:' + obj.state + '<br>节点数据:' + JSON.stringify(data)); |
| | | console.log(obj); |
| | | // 树点击三角形样式修改 |
| | |
| | | // ot.removeClass("left-navigation-bar-main-current"); |
| | | // var jh = $(`[data-id='${data.id}']`).find('.layui-tree-entry').eq(0); |
| | | // jh.addClass('left-navigation-bar-main-current'); |
| | | } |
| | | , showLine: false //是否开启连接线 |
| | | , oncheck: function (obj) { |
| | | console.log(obj.data.id, '--', obj.checked); //得到当前点击的节点数据 |
| | | }, |
| | | showLine: false //是否开启连接线 |
| | | , |
| | | oncheck: function (obj) { |
| | | console.log(obj.data.id, '--', obj.checked, obj); //得到当前点击的节点数据 |
| | | // console.log(obj.checked); //得到当前节点的展开状态:open、close、normal |
| | | // console.log(obj.elem); //得到当前节点元素 |
| | | |
| | | if (obj.data.children && obj.data.children.length > 0) { |
| | | |
| | | // 点击的父 |
| | | |
| | | |
| | | |
| | | |
| | | if (obj.checked == true) { |
| | | |
| | | obj.data.children.forEach(item => { |
| | | $.ajax({ |
| | | url: item.src + '/maps.json', |
| | | type: 'get', |
| | | dataType: 'JSON', |
| | | success: function (res) { |
| | | |
| | | that[item.id] = that.map.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({ |
| | | url: res[0].path, |
| | | })); |
| | | |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | |
| | | |
| | | } else { |
| | | obj.data.children.forEach(item => { |
| | | if (that[item.id]) that.map.imageryLayers.remove(that[item.id]); |
| | | }); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } else { |
| | | |
| | | |
| | | // 点击的子 |
| | | |
| | | if (obj.checked == true) { |
| | | |
| | | $.ajax({ |
| | | url: obj.data.src + '/maps.json', |
| | | type: 'get', |
| | | dataType: 'JSON', |
| | | success: function (res) { |
| | | console.log(res, 123) |
| | | |
| | | that[obj.data.id] = that.map.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({ |
| | | url: res[0].path, |
| | | })); |
| | | |
| | | } |
| | | }) |
| | | |
| | | |
| | | } else { |
| | | |
| | | |
| | | |
| | | that.map.imageryLayers.remove(that[obj.data.id]); |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | }); |
| | | |
| | |
| | | getChecked: function (othis) { |
| | | var checkedData = tree.getChecked('demoId1'); //获取选中节点的数据 |
| | | |
| | | layer.alert(JSON.stringify(checkedData), { shade: 0 }); |
| | | layer.alert(JSON.stringify(checkedData), { |
| | | shade: 0 |
| | | }); |
| | | console.log(checkedData); |
| | | } |
| | | , setChecked: function () { |
| | | }, |
| | | setChecked: function () { |
| | | tree.setChecked('demoId1', [12, 114]); //勾选指定节点 |
| | | } |
| | | , reload: function () { |
| | | }, |
| | | reload: function () { |
| | | //重载实例 |
| | | tree.reload('demoId1', { |
| | | |
| | |
| | | changeImg: true, |
| | | father: [], |
| | | data: [{ |
| | | title: '采集站点' |
| | | , id: 1 |
| | | , field: '1' |
| | | // , checked: true |
| | | , spread: true |
| | | , children: [{ |
| | | title: '南矶山保护区' |
| | | , id: 11 |
| | | , field: '1-1' |
| | | title: '采集站点', |
| | | id: 1, |
| | | field: '1' |
| | | // , checked: true |
| | | , spread: true |
| | | , children: [{ |
| | | title: '北深渊' |
| | | , id: 111 |
| | | , field: '1-1-1' |
| | | , checked: true |
| | | , |
| | | spread: true, |
| | | children: [{ |
| | | title: '南矶山保护区', |
| | | id: 11, |
| | | field: '1-1' |
| | | // , checked: true |
| | | , |
| | | spread: true, |
| | | children: [{ |
| | | title: '北深渊', |
| | | id: 111, |
| | | field: '1-1-1', |
| | | checked: true |
| | | }, { |
| | | title: '东湖' |
| | | , id: 112 |
| | | , field: '1-1-2' |
| | | , checked: true |
| | | title: '东湖', |
| | | id: 112, |
| | | field: '1-1-2', |
| | | checked: true |
| | | }, { |
| | | title: '矶山' |
| | | , id: 113 |
| | | , field: '1-1-3' |
| | | , checked: true |
| | | title: '矶山', |
| | | id: 113, |
| | | field: '1-1-3', |
| | | checked: true |
| | | }, { |
| | | title: '打钟山' |
| | | , id: 114 |
| | | , field: '1-1-4' |
| | | , checked: false |
| | | title: '打钟山', |
| | | id: 114, |
| | | field: '1-1-4', |
| | | checked: false |
| | | // , spread: true |
| | | }] |
| | | }, { |
| | | title: '五星白鹤保护区' |
| | | , id: 12 |
| | | , field: '1-2' |
| | | , checked: false |
| | | , spread: false |
| | | , children: [{ |
| | | title: '北深渊' |
| | | , id: 121 |
| | | , field: '1-2-1' |
| | | title: '五星白鹤保护区', |
| | | id: 12, |
| | | field: '1-2', |
| | | checked: false, |
| | | spread: false, |
| | | children: [{ |
| | | title: '北深渊', |
| | | id: 121, |
| | | field: '1-2-1' |
| | | }, { |
| | | title: '东湖' |
| | | , id: 122 |
| | | , field: '1-2-2' |
| | | title: '东湖', |
| | | id: 122, |
| | | field: '1-2-2' |
| | | }, { |
| | | title: '矶山' |
| | | , id: 123 |
| | | , field: '1-2-3' |
| | | title: '矶山', |
| | | id: 123, |
| | | field: '1-2-3' |
| | | }, { |
| | | title: '打钟山' |
| | | , id: 124 |
| | | , field: '1-2-4' |
| | | title: '打钟山', |
| | | id: 124, |
| | | field: '1-2-4' |
| | | }] |
| | | }, { |
| | | title: '都昌候鸟省级自然保护区' |
| | | , id: 13 |
| | | , field: '1-3' |
| | | , checked: false |
| | | , spread: false |
| | | , children: [{ |
| | | title: '北深渊' |
| | | , id: 131 |
| | | , field: '1-3-1' |
| | | title: '都昌候鸟省级自然保护区', |
| | | id: 13, |
| | | field: '1-3', |
| | | checked: false, |
| | | spread: false, |
| | | children: [{ |
| | | title: '北深渊', |
| | | id: 131, |
| | | field: '1-3-1' |
| | | }, { |
| | | title: '东湖' |
| | | , id: 132 |
| | | , field: '1-3-2' |
| | | title: '东湖', |
| | | id: 132, |
| | | field: '1-3-2' |
| | | }, { |
| | | title: '矶山' |
| | | , id: 133 |
| | | , field: '1-3-3' |
| | | title: '矶山', |
| | | id: 133, |
| | | field: '1-3-3' |
| | | }, { |
| | | title: '打钟山' |
| | | , id: 134 |
| | | , field: '1-3-4' |
| | | title: '打钟山', |
| | | id: 134, |
| | | field: '1-3-4' |
| | | }] |
| | | }, { |
| | | title: '都昌北鄱阳湿地公园' |
| | | , id: 14 |
| | | , field: '1-4' |
| | | , checked: false |
| | | , spread: false |
| | | , children: [{ |
| | | title: '北深渊' |
| | | , id: 141 |
| | | , field: '1-4-1' |
| | | title: '都昌北鄱阳湿地公园', |
| | | id: 14, |
| | | field: '1-4', |
| | | checked: false, |
| | | spread: false, |
| | | children: [{ |
| | | title: '北深渊', |
| | | id: 141, |
| | | field: '1-4-1' |
| | | }, { |
| | | title: '东湖' |
| | | , id: 142 |
| | | , field: '1-4-2' |
| | | title: '东湖', |
| | | id: 142, |
| | | field: '1-4-2' |
| | | }, { |
| | | title: '矶山' |
| | | , id: 143 |
| | | , field: '1-4-3' |
| | | title: '矶山', |
| | | id: 143, |
| | | field: '1-4-3' |
| | | }, { |
| | | title: '打钟山' |
| | | , id: 144 |
| | | , field: '1-4-4' |
| | | title: '打钟山', |
| | | id: 144, |
| | | field: '1-4-4' |
| | | }] |
| | | }], |
| | | }, { |
| | | title: '检测站点' |
| | | , id: 2 |
| | | , field: '2' |
| | | , checked: true |
| | | , spread: false |
| | | , children: [{ |
| | | title: '南矶山保护区' |
| | | , id: 21 |
| | | , field: '2-1' |
| | | , children: [{ |
| | | title: '北深渊' |
| | | , id: 211 |
| | | , field: '2-1-1' |
| | | title: '检测站点', |
| | | id: 2, |
| | | field: '2', |
| | | checked: true, |
| | | spread: false, |
| | | children: [{ |
| | | title: '南矶山保护区', |
| | | id: 21, |
| | | field: '2-1', |
| | | children: [{ |
| | | title: '北深渊', |
| | | id: 211, |
| | | field: '2-1-1' |
| | | }, { |
| | | title: '东湖' |
| | | , id: 212 |
| | | , field: '2-1-2' |
| | | title: '东湖', |
| | | id: 212, |
| | | field: '2-1-2' |
| | | }, { |
| | | title: '矶山' |
| | | , id: 213 |
| | | , field: '2-1-3' |
| | | title: '矶山', |
| | | id: 213, |
| | | field: '2-1-3' |
| | | }, { |
| | | title: '打钟山' |
| | | , id: 214 |
| | | , field: '2-1-4' |
| | | title: '打钟山', |
| | | id: 214, |
| | | field: '2-1-4' |
| | | }] |
| | | }, { |
| | | title: '五星白鹤保护区' |
| | | , id: 22 |
| | | , field: '2-2' |
| | | , children: [{ |
| | | title: '北深渊4' |
| | | , id: 221 |
| | | , field: '2-2-1' |
| | | title: '五星白鹤保护区', |
| | | id: 22, |
| | | field: '2-2', |
| | | children: [{ |
| | | title: '北深渊4', |
| | | id: 221, |
| | | field: '2-2-1' |
| | | }, { |
| | | title: '东湖' |
| | | , id: 222 |
| | | , field: '2-2-2' |
| | | title: '东湖', |
| | | id: 222, |
| | | field: '2-2-2' |
| | | }, { |
| | | title: '矶山' |
| | | , id: 223 |
| | | , field: '2-2-3' |
| | | title: '矶山', |
| | | id: 223, |
| | | field: '2-2-3' |
| | | }, { |
| | | title: '打钟山' |
| | | , id: 224 |
| | | , field: '2-2-4' |
| | | title: '打钟山', |
| | | id: 224, |
| | | field: '2-2-4' |
| | | }] |
| | | }, { |
| | | title: '都昌候鸟省级自然保护区' |
| | | , id: 23 |
| | | , field: '2-3' |
| | | , children: [{ |
| | | title: '北深渊' |
| | | , id: 231 |
| | | , field: '2-3-1' |
| | | title: '都昌候鸟省级自然保护区', |
| | | id: 23, |
| | | field: '2-3', |
| | | children: [{ |
| | | title: '北深渊', |
| | | id: 231, |
| | | field: '2-3-1' |
| | | }, { |
| | | title: '东湖' |
| | | , id: 232 |
| | | , field: '2-3-2' |
| | | title: '东湖', |
| | | id: 232, |
| | | field: '2-3-2' |
| | | }, { |
| | | title: '矶山' |
| | | , id: 233 |
| | | , field: '2-3-3' |
| | | title: '矶山', |
| | | id: 233, |
| | | field: '2-3-3' |
| | | }, { |
| | | title: '打钟山' |
| | | , id: 234 |
| | | , field: '2-3-4' |
| | | title: '打钟山', |
| | | id: 234, |
| | | field: '2-3-4' |
| | | }] |
| | | }, { |
| | | title: '都昌北鄱阳湿地公园' |
| | | , id: 24 |
| | | , field: '2-4' |
| | | , children: [{ |
| | | title: '北深渊5' |
| | | , id: 241 |
| | | , field: '2-4-1' |
| | | title: '都昌北鄱阳湿地公园', |
| | | id: 24, |
| | | field: '2-4', |
| | | children: [{ |
| | | title: '北深渊5', |
| | | id: 241, |
| | | field: '2-4-1' |
| | | }, { |
| | | title: '东湖' |
| | | , id: 242 |
| | | , field: '2-4-2' |
| | | title: '东湖', |
| | | id: 242, |
| | | field: '2-4-2' |
| | | }, { |
| | | title: '矶山' |
| | | , id: 243 |
| | | , field: '2-4-3' |
| | | title: '矶山', |
| | | id: 243, |
| | | field: '2-4-3' |
| | | }, { |
| | | title: '打钟山' |
| | | , id: 244 |
| | | , field: '2-4-4' |
| | | title: '打钟山', |
| | | id: 244, |
| | | field: '2-4-4' |
| | | }] |
| | | }], |
| | | }, { |
| | | title: '监控站点' |
| | | , id: 3 |
| | | , field: '3' |
| | | , checked: true |
| | | , spread: false |
| | | , children: [{ |
| | | title: '南矶山保护区' |
| | | , id: 31 |
| | | , field: '3-1' |
| | | , children: [{ |
| | | title: '北深渊2' |
| | | , id: 311 |
| | | , field: '3-1-1' |
| | | title: '监控站点', |
| | | id: 3, |
| | | field: '3', |
| | | checked: true, |
| | | spread: false, |
| | | children: [{ |
| | | title: '南矶山保护区', |
| | | id: 31, |
| | | field: '3-1', |
| | | children: [{ |
| | | title: '北深渊2', |
| | | id: 311, |
| | | field: '3-1-1' |
| | | }, { |
| | | title: '东湖' |
| | | , id: 312 |
| | | , field: '3-1-2' |
| | | title: '东湖', |
| | | id: 312, |
| | | field: '3-1-2' |
| | | }, { |
| | | title: '矶山' |
| | | , id: 313 |
| | | , field: '3-1-3' |
| | | title: '矶山', |
| | | id: 313, |
| | | field: '3-1-3' |
| | | }, { |
| | | title: '打钟山' |
| | | , id: 314 |
| | | , field: '3-1-4' |
| | | title: '打钟山', |
| | | id: 314, |
| | | field: '3-1-4' |
| | | }] |
| | | }, { |
| | | title: '五星白鹤保护区' |
| | | , id: 32 |
| | | , field: '3-2' |
| | | , children: [{ |
| | | title: '北深渊3' |
| | | , id: 321 |
| | | , field: '3-2-1' |
| | | title: '五星白鹤保护区', |
| | | id: 32, |
| | | field: '3-2', |
| | | children: [{ |
| | | title: '北深渊3', |
| | | id: 321, |
| | | field: '3-2-1' |
| | | }, { |
| | | title: '东湖' |
| | | , id: 322 |
| | | , field: '3-2-2' |
| | | title: '东湖', |
| | | id: 322, |
| | | field: '3-2-2' |
| | | }, { |
| | | title: '矶山' |
| | | , id: 323 |
| | | , field: '3-2-3' |
| | | title: '矶山', |
| | | id: 323, |
| | | field: '3-2-3' |
| | | }, { |
| | | title: '打钟山' |
| | | , id: 324 |
| | | , field: '3-2-4' |
| | | title: '打钟山', |
| | | id: 324, |
| | | field: '3-2-4' |
| | | }] |
| | | }, { |
| | | title: '都昌候鸟省级自然保护区' |
| | | , id: 33 |
| | | , field: '3-3' |
| | | , children: [{ |
| | | title: '北深渊' |
| | | , id: 331 |
| | | , field: '3-3-1' |
| | | title: '都昌候鸟省级自然保护区', |
| | | id: 33, |
| | | field: '3-3', |
| | | children: [{ |
| | | title: '北深渊', |
| | | id: 331, |
| | | field: '3-3-1' |
| | | }, { |
| | | title: '东湖' |
| | | , id: 332 |
| | | , field: '3-3-2' |
| | | title: '东湖', |
| | | id: 332, |
| | | field: '3-3-2' |
| | | }, { |
| | | title: '矶山' |
| | | , id: 333 |
| | | , field: '3-3-3' |
| | | title: '矶山', |
| | | id: 333, |
| | | field: '3-3-3' |
| | | }, { |
| | | title: '打钟山' |
| | | , id: 334 |
| | | , field: '3-3-4' |
| | | title: '打钟山', |
| | | id: 334, |
| | | field: '3-3-4' |
| | | }] |
| | | }, { |
| | | title: '都昌北鄱阳湿地公园' |
| | | , id: 34 |
| | | , field: '3-4' |
| | | , children: [{ |
| | | title: '北深渊1' |
| | | , id: 341 |
| | | , field: '3-4-1' |
| | | title: '都昌北鄱阳湿地公园', |
| | | id: 34, |
| | | field: '3-4', |
| | | children: [{ |
| | | title: '北深渊1', |
| | | id: 341, |
| | | field: '3-4-1' |
| | | }, { |
| | | title: '东湖' |
| | | , id: 342 |
| | | , field: '3-4-2' |
| | | title: '东湖', |
| | | id: 342, |
| | | field: '3-4-2' |
| | | }, { |
| | | title: '矶山' |
| | | , id: 343 |
| | | , field: '3-4-3' |
| | | title: '矶山', |
| | | id: 343, |
| | | field: '3-4-3' |
| | | }, { |
| | | title: '打钟山' |
| | | , id: 344 |
| | | , field: '3-4-4' |
| | | title: '打钟山', |
| | | id: 344, |
| | | field: '3-4-4' |
| | | }] |
| | | }], |
| | | }], |
| | |
| | | } else if (txt == "水质站") { |
| | | // 与实体相关的图片 |
| | | billbo = { |
| | | image: 'http://www.sw797.com:801/gzsw3D/v2/images/icon/szz.png', |
| | | image: 'http://www.sw797.com:10011/gzsw3D/v2/images/icon/szz.png', |
| | | pixelOffset: new Cesium.Cartesian2(0, 0), |
| | | width: 16, |
| | | height: 16, |
| | |
| | | } else if (txt == "中小河流站") { |
| | | // 与实体相关的图片 |
| | | billbo = { |
| | | image: 'http://www.sw797.com:801/gzsw3D/v2/images/icon/zxhlz.png', |
| | | image: 'http://www.sw797.com:10011/gzsw3D/v2/images/icon/zxhlz.png', |
| | | pixelOffset: new Cesium.Cartesian2(0, 0), |
| | | width: 16, |
| | | height: 16, |
| | |
| | | if (data.length > 0) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | var div = "<div class='location-lb'>" + |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | '<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' + '<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、'] + '</div>' + "</div>"; |
| | | $("#loc-tab1-grid").append(div); |
| | | } |
| | |
| | | if (data.length > 0) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | var div = "<div id='location-lb' class='location-lb'>" + |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | '<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' + '<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、'] + '</div>' + "</div>"; |
| | | $("#loc-tab2-grid").append(div); |
| | | } |
| | |
| | | if (data.length > 0) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | var div = "<div id='location-lb' class='location-lb'>" + |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | '<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' + '<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、村'] + '</div>' + "</div>"; |
| | | $("#loc-tab3-grid").append(div); |
| | | } |
| | |
| | | if (data.length > 0) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | var div = "<div class='location-lb'>" + |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | '<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' + |
| | | '<div class=location-zb><lable>流域:</lable>' + data[i]['流域'] + '</div>' + |
| | | '<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、'] + '</div>' + |
| | |
| | | if (data.length > 0) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | var div = "<div id='location-lb' class='location-lb'>" + |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | '<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' + |
| | | '<div class=location-zb><lable>流域:</lable>' + data[i]['流域'] + '</div>' + |
| | | '<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、'] + '</div>' + |
| | |
| | | if (data.length > 0) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | var div = "<div id='location-lb' class='location-lb'>" + |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | '<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' + |
| | | '<div class=location-zb><lable>流域:</lable>' + data[i]['流域'] + '</div>' + |
| | | '<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、村'] + '</div>' + |
| | |
| | | if (data.length > 0) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | var div = "<div class='location-lb'>" + |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | '<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' + |
| | | '<div class=location-zb><lable>流域:</lable>' + data[i]['流域'] + '</div>' + |
| | | '<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、'] + '</div>' + |
| | |
| | | if (data.length > 0) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | var div = "<div id='location-lb' class='location-lb'>" + |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | '<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' + |
| | | '<div class=location-zb><lable>流域:</lable>' + data[i]['流域'] + '</div>' + |
| | | '<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、'] + '</div>' + |
| | |
| | | if (data.length > 0) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | var div = "<div id='location-lb' class='location-lb'>" + |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+ |
| | | '<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' + |
| | | '<div class=location-zb><lable>流域:</lable>' + data[i]['流域'] + '</div>' + |
| | | '<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、村'] + '</div>' + |
| | |
| | | offset: '70px', |
| | | maxmin: true, //开启最大化最小化按钮 |
| | | area: ['100%', 'calc(100% - 70px)'], |
| | | content: 'http://www.sw797.com:801/gzsw3D/views/water/River_Len.html' |
| | | content: 'http://www.sw797.com:10011/gzsw3D/views/water/River_Len.html' |
| | | }); |
| | | |
| | | })); |
| | |
| | | |
| | | onOpen: function() { |
| | | //面板打开的时候触发 (when open this panel trigger) |
| | | parent.open('http://www.sw797.com:801/gzapp/#monitorduty') |
| | | parent.open('http://www.sw797.com:10011/gzapp/#monitorduty') |
| | | }, |
| | | |
| | | onClose: function() { |
| | |
| | | { |
| | | "label": "赣州市离线影像", |
| | | "type": "url", |
| | | "url": "http://www.sw797.com:801/gzsw3D/v2/data/wp/{z}/{x}/{y}.png" |
| | | "url": "http://www.sw797.com:10011/gzsw3D/v2/data/wp/{z}/{x}/{y}.png" |
| | | } |
| | | ] |
| | | }, |
| | |
| | | <div class="hezi-left-select"> |
| | | <span class="hezi-leftspan" id="gaibian">左侧图层 :</span> |
| | | <select class="hezi-select" id="hezi-selectLeft"> |
| | | <option class="optionVal2" value="2">天地图矢量</option> |
| | | <option class="optionVal1" value="1">天地图影像</option> |
| | | <option class="optionVal2" value="2">天地图矢量</option> |
| | | </select> |
| | | </div> |
| | | <div class="hezi-right-select"> |
| | |
| | | define([ |
| | | 'dojo/_base/declare', |
| | | 'dojo/_base/lang', |
| | | 'dojo/_base/array', |
| | | 'dojo/_base/html', |
| | | 'dojo/topic', |
| | | 'jimu/BaseWidget', |
| | | ], |
| | | 'dojo/_base/declare', |
| | | 'dojo/_base/lang', |
| | | 'dojo/_base/array', |
| | | 'dojo/_base/html', |
| | | 'dojo/topic', |
| | | 'jimu/BaseWidget', |
| | | ], |
| | | function (declare, |
| | | lang, |
| | | array, |
| | |
| | | "tileMatrixSetID": "w", |
| | | "maximumLevel": 17 |
| | | }], |
| | | // 赣州地图 |
| | | imageryProviderArrUrl: [{ |
| | | "label": "赣州市离线影像", |
| | | "type": "url", |
| | | "url": "http://www.sw797.com:801/gzsw3D/v2/data/wp/{z}/{x}/{y}.png" |
| | | }], |
| | | // 天地图电子 |
| | | imageryProviderDian: [{ |
| | | "label": "天地图矢量", |
| | |
| | | earthAtNightRight: '', |
| | | zjLeft: 0, |
| | | zjRight: '', |
| | | |
| | | tiandituLeft: '', |
| | | tiandituZJLeft: '', |
| | | tiandituRight: '', |
| | | tiandituZJRight: '', |
| | | ganZhouYinLeft: '', |
| | | ganZhouYinRight: '', |
| | | |
| | | startup: function () { |
| | | topic.subscribe("openRolling", lang.hitch(this, this.openRolling)); |
| | | var that = this; |
| | | // 点击卷帘关闭面板 |
| | | $('.rollinng-table-hezi-xx').click(function () { |
| | | |
| | | that.map.imageryLayers.remove(that.earthAtNightLeft); |
| | | that.map.imageryLayers.remove(that.earthAtNightRight); |
| | | that.map.imageryLayers.remove(that.zjLeft); |
| | | |
| | | that.map.imageryLayers.remove(that.earthAtNightRight); |
| | | that.map.imageryLayers.remove(that.zjRight); |
| | | |
| | | |
| | | that.map.imageryLayers.remove(that.tiandituLeft); |
| | | that.map.imageryLayers.remove(that.tiandituZJLeft); |
| | | |
| | | that.map.imageryLayers.remove(that.tiandituRight); |
| | | that.map.imageryLayers.remove(that.tiandituZJRight); |
| | | that.map.imageryLayers.remove(that.ganZhouYinLeft); |
| | | that.map.imageryLayers.remove(that.ganZhouYinRight); |
| | | |
| | | $('.jimu-widget-Rolling').hide(); |
| | | $('#hezi-selectLeft').val(2); |
| | | $('#hezi-selectRight').val(3); |
| | | |
| | | }); |
| | | |
| | | // 加载左边图层 |
| | | $('#hezi-selectLeft').on('change', function () { |
| | | // 将滑块的位置与拆分位置同步 |
| | | var slider = document.getElementById('slider'); |
| | | that.map.scene.imagerySplitPosition = (slider.offsetLeft - slider.parentElement.offsetWidth) / (slider.parentElement.offsetWidth); |
| | | that.map.scene.imagerySplitPosition.x = (slider.offsetLeft - slider.parentElement.offsetWidth) / (slider.parentElement.offsetWidth); |
| | | if ($(this).val() == 2) { |
| | | // viewer.imageryLayers.remove(that.tiandituLeft); |
| | | // viewer.imageryLayers.remove(that.tiandituZJLeft); |
| | | viewer.imageryLayers.remove(that.ganZhouYinLeft); |
| | | loadMapTianLeft(); |
| | | } else if ($(this).val() == 1) { |
| | | loadMapLeft(); |
| | | that.earthAtNightLeft.splitDirection = Cesium.ImagerySplitDirection.LEFT; |
| | | that.zjLeft.splitDirection = Cesium.ImagerySplitDirection.LEFT; |
| | | } |
| | | else if ($(this).val() == 1) { |
| | | viewer.imageryLayers.remove(that.earthAtNightLeft); |
| | | viewer.imageryLayers.remove(that.zjLeft); |
| | | // viewer.imageryLayers.remove(that.tiandituLeft); |
| | | // viewer.imageryLayers.remove(that.tiandituZJLeft); |
| | | loadMapGzLeft(); |
| | | that.ganZhouYinLeft.splitDirection = Cesium.ImagerySplitDirection.LEFT; |
| | | } |
| | | else { |
| | | viewer.imageryLayers.remove(that.earthAtNightLeft); |
| | | viewer.imageryLayers.remove(that.zjLeft); |
| | | viewer.imageryLayers.remove(that.ganZhouYinLeft); |
| | | } |
| | | }); |
| | | |
| | |
| | | // debugger |
| | | // 将滑块的位置与拆分位置同步 |
| | | var slider = document.getElementById('slider'); |
| | | that.map.scene.imagerySplitPosition = (slider.offsetLeft - slider.parentElement.offsetWidth) / (slider.parentElement.offsetWidth); |
| | | that.map.scene.imagerySplitPosition.x = (slider.offsetLeft - slider.parentElement.offsetWidth) / (slider.parentElement.offsetWidth); |
| | | if ($(this).val() == 2) { |
| | | // loadMap(that.earthAtNightRight, that.zjRight); |
| | | viewer.imageryLayers.remove(that.tiandituRight); |
| | | viewer.imageryLayers.remove(that.tiandituZJRight); |
| | | loadMapRight(); |
| | | that.earthAtNightRight.splitDirection = Cesium.ImagerySplitDirection.RIGHT; |
| | | that.zjRight.splitDirection = Cesium.ImagerySplitDirection.RIGHT; |
| | | } |
| | | else if ($(this).val() == 3) { |
| | | viewer.imageryLayers.remove(that.earthAtNightRight); |
| | | viewer.imageryLayers.remove(that.zjRight); |
| | | } else if ($(this).val() == 1) { |
| | | loadMapTianRight(); |
| | | that.tiandituRight.splitDirection = Cesium.ImagerySplitDirection.RIGHT; |
| | | that.tiandituZJRight.splitDirection = Cesium.ImagerySplitDirection.RIGHT; |
| | | } |
| | | else { |
| | | viewer.imageryLayers.remove(that.earthAtNightRight); |
| | | viewer.imageryLayers.remove(that.zjRight); |
| | | loadMapGzRight(); |
| | | that.ganZhouYinRight.splitDirection = Cesium.ImagerySplitDirection.RIGHT; |
| | | // viewer.imageryLayers.remove(that.tiandituRight); |
| | | // viewer.imageryLayers.remove(that.tiandituZJRight); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | // 加载左边天地图影像图层方法 |
| | | function loadMapLeft() { |
| | | that.map.imageryLayers.remove(that.tiandituLeft); |
| | | that.map.imageryLayers.remove(that.tiandituZJLeft); |
| | | //imageryLayers获取将在地球上渲染的图像图层的集合 |
| | | var layers = viewer.imageryLayers; |
| | | //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中 |
| | | that.earthAtNightLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.earthAtNightLeft = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.imageryProviderAdd[0] |
| | | )); |
| | | that.zjLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.zjLeft = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.imageryProviderAdd[1] |
| | | )); |
| | | } |
| | | |
| | | // 加载左边赣州影像图层方法 |
| | | function loadMapGzLeft() { |
| | | //imageryLayers获取将在地球上渲染的图像图层的集合 |
| | | var layers = viewer.imageryLayers; |
| | | //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中 UrlTemplateImageryProvider |
| | | that.ganZhouYinLeft = layers.addImageryProvider(new Cesium.UrlTemplateImageryProvider( |
| | | that.imageryProviderArrUrl[0] |
| | | )); |
| | | that.earthAtNightLeft.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.LEFT, Cesium.ImagerySplitDirection.NONE); |
| | | that.zjLeft.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.LEFT, Cesium.ImagerySplitDirection.NONE); |
| | | } |
| | | |
| | | // 加载左边天地图电子图层方法 |
| | | function loadMapTianLeft() { |
| | | that.map.imageryLayers.remove(that.earthAtNightLeft); |
| | | that.map.imageryLayers.remove(that.zjLeft); |
| | | //imageryLayers获取将在地球上渲染的图像图层的集合 |
| | | var layers = viewer.imageryLayers; |
| | | //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中 |
| | | that.tiandituLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.tiandituLeft = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.imageryProviderDian[0] |
| | | )); |
| | | that.tiandituZJLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.tiandituZJLeft = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.imageryProviderDian[1] |
| | | )); |
| | | |
| | | that.tiandituLeft.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.LEFT, Cesium.ImagerySplitDirection.NONE); |
| | | that.tiandituZJLeft.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.LEFT, Cesium.ImagerySplitDirection.NONE); |
| | | } |
| | | |
| | | |
| | | // 加载右边天地图影像图层方法 |
| | | function loadMapRight() { |
| | | that.map.imageryLayers.remove(that.tiandituRight); |
| | | that.map.imageryLayers.remove(that.tiandituZJRight); |
| | | //imageryLayers获取将在地球上渲染的图像图层的集合 |
| | | var layers = viewer.imageryLayers; |
| | | //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中 |
| | | that.earthAtNightRight = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.earthAtNightRight = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.imageryProviderAdd[0] |
| | | )); |
| | | that.zjRight = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.zjRight = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.imageryProviderAdd[1] |
| | | )); |
| | | that.earthAtNightRight.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.RIGHT, Cesium.ImagerySplitDirection.NONE); |
| | | that.zjRight.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.RIGHT, Cesium.ImagerySplitDirection.NONE); |
| | | } |
| | | |
| | | // 加载右边天地图电子图层方法 |
| | | function loadMapTianRight() { |
| | | that.map.imageryLayers.remove(that.earthAtNightRight); |
| | | that.map.imageryLayers.remove(that.zjRight); |
| | | //imageryLayers获取将在地球上渲染的图像图层的集合 |
| | | var layers = viewer.imageryLayers; |
| | | //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中 |
| | | that.tiandituRight = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.tiandituRight = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.imageryProviderDian[0] |
| | | )); |
| | | that.tiandituZJRight = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.tiandituZJRight = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.imageryProviderDian[1] |
| | | )); |
| | | that.tiandituRight.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.RIGHT, Cesium.ImagerySplitDirection.NONE); |
| | | that.tiandituZJRight.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.RIGHT, Cesium.ImagerySplitDirection.NONE); |
| | | } |
| | | |
| | | // 加载右边赣州影像图层方法 |
| | | function loadMapGzRight() { |
| | | //imageryLayers获取将在地球上渲染的图像图层的集合 |
| | | var layers = viewer.imageryLayers; |
| | | //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中 UrlTemplateImageryProvider |
| | | that.ganZhouYinRight = layers.addImageryProvider(new Cesium.UrlTemplateImageryProvider( |
| | | that.imageryProviderArrUrl[0] |
| | | )); |
| | | } |
| | | |
| | | var handler = new Cesium.ScreenSpaceEventHandler(slider); |
| | | |
| | | var moveActive = false; |
| | | |
| | | function move(movement) { |
| | | if (!moveActive) { |
| | | return; |
| | | } |
| | | var relativeOffset = movement.endPosition.x; |
| | | |
| | | // 将滑块的位置与拆分位置同步 |
| | | viewer.scene.imagerySplitPosition = (slider.offsetLeft + relativeOffset - slider.parentElement.offsetWidth) / (slider.parentElement.offsetWidth); |
| | | slider.style.left = 100.0 * + (slider.offsetLeft + relativeOffset) / (slider.parentElement.offsetWidth) + '%'; |
| | | that.map.scene.imagerySplitPosition.x = (slider.offsetLeft + relativeOffset - slider.parentElement.offsetWidth) / (slider.parentElement.offsetWidth); |
| | | slider.style.left = 100.0 * +(slider.offsetLeft + relativeOffset) / (slider.parentElement.offsetWidth) + '%'; |
| | | |
| | | } |
| | | |
| | | |
| | | handler.setInputAction(function () { |
| | | moveActive = true; |
| | | }, Cesium.ScreenSpaceEventType.LEFT_DOWN);//左键按下事件 |
| | | }, Cesium.ScreenSpaceEventType.LEFT_DOWN); //左键按下事件 |
| | | handler.setInputAction(function () { |
| | | moveActive = true; |
| | | }, Cesium.ScreenSpaceEventType.PINCH_START);//触摸表面上双指事件的开始 |
| | | }, Cesium.ScreenSpaceEventType.PINCH_START); //触摸表面上双指事件的开始 |
| | | |
| | | handler.setInputAction(move, Cesium.ScreenSpaceEventType.MOUSE_MOVE);//鼠标移动事件 |
| | | handler.setInputAction(move, Cesium.ScreenSpaceEventType.PINCH_MOVE);//触摸表面上双指移动事件 |
| | | handler.setInputAction(move, Cesium.ScreenSpaceEventType.MOUSE_MOVE); //鼠标移动事件 |
| | | handler.setInputAction(move, Cesium.ScreenSpaceEventType.PINCH_MOVE); //触摸表面上双指移动事件 |
| | | |
| | | handler.setInputAction(function () { |
| | | moveActive = false; |
| | | }, Cesium.ScreenSpaceEventType.LEFT_UP);//鼠标左键抬起事件 |
| | | }, Cesium.ScreenSpaceEventType.LEFT_UP); //鼠标左键抬起事件 |
| | | handler.setInputAction(function () { |
| | | moveActive = false; |
| | | }, Cesium.ScreenSpaceEventType.PINCH_END);//触摸表面上的双指事件的结束 |
| | | }, Cesium.ScreenSpaceEventType.PINCH_END); //触摸表面上的双指事件的结束 |
| | | }, |
| | | |
| | | openRolling: function (item) { |
| | |
| | | var that = this; |
| | | if (this.flag != true) return; |
| | | var slider = document.getElementById('slider'); |
| | | that.map.scene.imagerySplitPosition = (slider.offsetLeft - slider.parentElement.offsetWidth) / (slider.parentElement.offsetWidth); |
| | | that.map.scene.imagerySplitPosition = 0.5; |
| | | loadMapLeft(); |
| | | that.earthAtNightLeft.splitDirection = Cesium.ImagerySplitDirection.LEFT; |
| | | that.zjLeft.splitDirection = Cesium.ImagerySplitDirection.LEFT; |
| | | that.map.scene.imagerySplitPosition.x = (slider.offsetLeft - slider.parentElement.offsetWidth) / (slider.parentElement.offsetWidth); |
| | | that.map.scene.imagerySplitPosition.x = 0.5; |
| | | |
| | | function loadMapLeft() { |
| | | //imageryLayers获取将在地球上渲染的图像图层的集合 |
| | | var layers = that.map.imageryLayers; |
| | | //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中 |
| | | that.earthAtNightLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.imageryProviderAdd[0] |
| | | )); |
| | | that.zjLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.imageryProviderAdd[1] |
| | | )); |
| | | } |
| | | |
| | | |
| | | that.earthAtNightLeft = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.imageryProviderAdd[0] |
| | | )); |
| | | that.zjLeft = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.imageryProviderAdd[1] |
| | | )); |
| | | |
| | | that.earthAtNightLeft.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.LEFT, Cesium.ImagerySplitDirection.NONE); |
| | | that.zjLeft.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.LEFT, Cesium.ImagerySplitDirection.NONE); |
| | | |
| | | |
| | | that.tiandituRight = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.imageryProviderDian[0] |
| | | )); |
| | | that.tiandituZJRight = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.imageryProviderDian[1] |
| | | )); |
| | | |
| | | that.tiandituRight.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.RIGHT, Cesium.ImagerySplitDirection.NONE); |
| | | that.tiandituZJRight.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.RIGHT, Cesium.ImagerySplitDirection.NONE); |
| | | }, |
| | | |
| | | |
| | |
| | | display: none; |
| | | } |
| | | |
| | | .rollinng-table-hezi { |
| | | .jimu-widget-Rolling .rollinng-table-hezi { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 0 15px; |
| | | } |
| | | |
| | | .hezi-left-select { |
| | | .jimu-widget-Rolling .hezi-left-select { |
| | | line-height: 50px; |
| | | } |
| | | |
| | | .hezi-right-select { |
| | | .jimu-widget-Rolling .hezi-right-select { |
| | | height: 32px; |
| | | } |
| | | |
| | | .hezi-leftspan, .hezi-rightspan { |
| | | .jimu-widget-Rolling .hezi-leftspan, .hezi-rightspan { |
| | | font-size: 14px; |
| | | color: #fff; |
| | | color: #3c464b; |
| | | margin-right: 7px; |
| | | } |
| | | |
| | | .hezi-select { |
| | | background-color: #404853; |
| | | .jimu-widget-Rolling .hezi-select { |
| | | background-color: rgb(129, 129, 129); |
| | | color: #fff; |
| | | padding: 5px; |
| | | border: none; |
| | | outline: none; |
| | | } |
| | | |
| | | |
| | | |
| | | .hezi-select:hover { |
| | | .jimu-widget-Rolling .hezi-select:hover { |
| | | background-color: rgba(255, 255, 255,.75); |
| | | color: #3c464b; |
| | | } |
| | | |
| | | .rollinng-table-hezi-xx { |
| | | .jimu-widget-Rolling .rollinng-table-hezi-xx { |
| | | font-size: 20px; |
| | | margin-bottom: 5px; |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .rollinng-table-hezi-xx:hover { |
| | | .jimu-widget-Rolling .rollinng-table-hezi-xx:hover { |
| | | cursor: pointer; |
| | | color: red; |
| | | } |
| | | |
| | | #slider { |
| | | .jimu-widget-Rolling #slider { |
| | | position: absolute; |
| | | left: 150%; |
| | | top: 0; |
| | |
| | | z-index: 1; |
| | | } |
| | | |
| | | #slider:hover { |
| | | .jimu-widget-Rolling #slider:hover { |
| | | cursor: ew-resize; |
| | | } |
| | | |
| | | .hiddenHeZi { |
| | | .jimu-widget-Rolling .hiddenHeZi { |
| | | position: fixed; |
| | | width: 100%; |
| | | height: 100%; |
| | |
| | | .jimu-widget-Tool { |
| | | position : relative; |
| | | font-size : 14px; |
| | | height : 32px; |
| | | line-height : 32px; |
| | | width : 100%; |
| | | position: relative; |
| | | font-size: 14px; |
| | | height: 36px; |
| | | line-height: 36px; |
| | | width: 100%; |
| | | /* 240px */ |
| | | background : rgba(255, 255, 255, 0.7); |
| | | color : #000; |
| | | border-right : 1px solid rgba(0, 0, 0, 0.3); |
| | | background: rgb(254, 254, 254); |
| | | color: #838383; |
| | | border-right: 1px solid #DDDDDD; |
| | | border-radius: 6px 0 0 6px; |
| | | text-align : center; |
| | | cursor : pointer; |
| | | z-index : 10 !important; |
| | | text-align: center; |
| | | cursor: pointer; |
| | | z-index: 10 !important; |
| | | } |
| | | |
| | | .jimu-widget-Tool .tool-bar { |
| | | width: 100%; |
| | | } |
| | | .jimu-widget-Tool .tool-bar .tool-btn{ |
| | | display: flex; |
| | | |
| | | .jimu-widget-Tool .tool-bar .tool-btn { |
| | | align-items: center; |
| | | justify-content: space-around; |
| | | } |
| | | |
| | | .jimu-widget-Tool .tool-bar .tool-btn i { |
| | | display : inline-block; |
| | | width : 22px; |
| | | height : 22px; |
| | | background : url(../../../images/gongju.png) no-repeat; |
| | | display: inline-block; |
| | | width: 22px; |
| | | height: 22px; |
| | | background: url(../../../images/gongju.png) no-repeat; |
| | | background-size: 22px; |
| | | vertical-align : middle; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .jimu-widget-Tool .tool-bar .tool-btn span:hover { |
| | |
| | | } |
| | | |
| | | .jimu-widget-Tool .tool-bar .tool-btn del { |
| | | display : inline-block; |
| | | width : 10px; |
| | | height : 6px; |
| | | background : url(../../../images/toolbottom1.png) no-repeat; |
| | | background-size : 10px 6px; |
| | | display: inline-block; |
| | | width: 10px; |
| | | height: 6px; |
| | | background: url(../../../images/toolbottom1.png) no-repeat; |
| | | background-size: 10px 6px; |
| | | /* vertical-align: / */ |
| | | } |
| | | |
| | | .jimu-widget-Tool .tool-bar .tool-y-box { |
| | | display : none; |
| | | position : absolute; |
| | | top : 36px; |
| | | right : -5px; |
| | | width : 110px; |
| | | display: none; |
| | | position: absolute; |
| | | top: 40px; |
| | | right: 0px; |
| | | width: 100px; |
| | | /* height: 505px; */ |
| | | height : 38px; |
| | | height: 38px; |
| | | } |
| | | |
| | | .jimu-widget-Tool .tool-bar .tool-y-box ul, |
| | | .jimu-widget-Tool .tool-bar .tool-y-box li { |
| | | margin : 0; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | .jimu-widget-Tool .tool-bar .tool-y-box ul { |
| | | height: 100%; |
| | | border-radius: 5px; |
| | | height: auto; |
| | | box-shadow: 0px 0px 2px 1px #E5E5E5; |
| | | } |
| | | |
| | | .jimu-widget-Tool .tool-bar .tool-y-box li { |
| | | list-style : none; |
| | | height : 34px; |
| | | line-height: 34px; |
| | | width : 102px; |
| | | background : rgba(255, 255, 255, 0.7); |
| | | list-style: none; |
| | | height: 36px; |
| | | line-height: 36px; |
| | | background: #FEFEFE; |
| | | } |
| | | |
| | | .jimu-widget-Tool .tool-bar .tool-y-box li:hover { |
| | | background: rgba(61,159,250, .7); |
| | | color: #fff; |
| | | background: #3F9CFC; |
| | | } |
| | | |
| | | .jimu-widget-Tool .tool-bar .tool-y-box li i { |
| | | margin-top : -2px; |
| | | display : inline-block; |
| | | width : 16px; |
| | | height : 16px; |
| | | margin-top: -2px; |
| | | display: inline-block; |
| | | width: 16px; |
| | | height: 16px; |
| | | background-size: 100%; |
| | | vertical-align : middle; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .jimu-widget-Tool .tool-bar .tool-y-box li:nth-child(1) { |
| | |
| | | .jimu-widget-Tool .tool-bar .tool-y-box li:nth-child(6) i { |
| | | background: url(../../../images/toolbox1.png ) no-repeat 0 -126px; |
| | | } |
| | | |
| | | .jimu-widget-Tool .tool-bar .tool-y-box li:nth-child(7) i { |
| | | background: url(../../../images/toolbox1.png ) no-repeat 0 -173px; |
| | | } |
| | |
| | | .jimu-widget-Tool .tool-bar .tool-y-box li:nth-child(8) i { |
| | | background: url(../../../images/toolbox1.png ) no-repeat 0 -16px; |
| | | } |
| | | |
| | | .jimu-widget-Tool .tool-bar .tool-y-box li:nth-child(9) i { |
| | | background: url(../../../images/toolbox1.png ) no-repeat 0 -156px; |
| | | } |
| | | |
| | | .jimu-widget-Tool .tool-bar .tool-y-box li:nth-child(9) { |
| | | border-radius: 0 0 5px 5px; |
| | | } |
| | |
| | | $(".v-a-One").css({ 'backgroundColor': '#3F9DFD', 'color': '#fff' }); |
| | | $(this).find('.v-a-o-img').attr("src", "../../../images/addL/wtiyan.png"); |
| | | // .attr("src", src_value); |
| | | |
| | | // 控制视角平移: |
| | | that.map.scene.screenSpaceCameraController.enableRotate = true |
| | | |
| | | // true: 允许左键按下视角平移; |
| | | |
| | | // false: 禁止左键按下视角平移; |
| | | |
| | | // 控制视角缩放: |
| | | that.map.scene.screenSpaceCameraController.enableZoom = true |
| | | |
| | | // true: 允许中键缩放视角; |
| | | |
| | | // false:禁止中键缩放视角; |
| | | |
| | | // 控制视角旋转: |
| | | that.map.scene.screenSpaceCameraController.enableTilt = true |
| | | |
| | | // true:允许视角旋转; |
| | | |
| | | // false:禁止视角旋转; |
| | | |
| | | }) |
| | | $(".v-a-Two").click(function () { |
| | | that.clearColor('two'); |
| | |
| | | that.clearColor('three'); |
| | | $(".v-a-Three").css({ 'backgroundColor': '#3F9DFD', 'color': '#fff' }); |
| | | $(this).find('.v-a-o-img').attr("src", "../../../images/addL/wshijiao.png"); |
| | | that.map.scene.screenSpaceCameraController.enableRotate = false |
| | | that.map.scene.screenSpaceCameraController.enableZoom = true |
| | | that.map.scene.screenSpaceCameraController.enableTilt = false |
| | | }) |
| | | |
| | | // $('.RouteNavigate-tool').click(function () { |
| | |
| | | .jimu-widget-visualAngle { |
| | | position : fixed; |
| | | font-size : 14px; |
| | | height : 60px !important; |
| | | height : 72px !important; |
| | | /* line-height : 32px; */ |
| | | width : 179px !important; |
| | | width : 216px !important; |
| | | right: auto !important; |
| | | top: auto !important; |
| | | bottom: 100px !important; |
| | |
| | | } |
| | | |
| | | .jimu-widget-visualAngle .visualAngleOnce{ |
| | | width: 60px; |
| | | width: 72px; |
| | | box-sizing: border-box; |
| | | /* border: 1px solid springgreen; */ |
| | | height: 60px; |
| | | height: 72px; |
| | | cursor: pointer; |
| | | display: flex; |
| | | align-items: center; |