| | |
| | | name: '剖面分析', |
| | | classs: 'profileAnalysis-tool', |
| | | img: './images/addL/剖面分析.png' |
| | | }, { |
| | | name: '建造实体', |
| | | classs: 'modelDiagram-tool', |
| | | img: './images/addL/pdpx.png' |
| | | } |
| | | // , { |
| | | // , {//做好静态, |
| | | // name: '建造实体', |
| | | // classs: 'modelDiagram-tool', |
| | | // img: './images/addL/pdpx.png' |
| | | // } |
| | | // , {//https://blog.csdn.net/supermapsupport/article/details/100134590 |
| | | // //需要iServer发布成三维服务 |
| | | // name: '坡度分析', |
| | | // classs: 'slope-tool', |
| | | // img: './images/addL/pdpx.png' |
| | | // } |
| | | , {//SQL查询,//做好 |
| | | name: 'SQL查询', |
| | | classs: 'SQLQuery-tool', |
| | | img: './images/addL/pdpx.png' |
| | | } |
| | | ]; |
| | | var dom = $('#spatialAnalysis-main'); |
| | | var str = ''; |
| | | that.beginSpatialAnalysis(domHtmls); |
| | | |
| | | $('.ccsliu').click(() => {//测试开关 点击图例其他的图片 |
| | | var domHtmls = [ |
| | | { |
| | | name: '可视分析', |
| | | classs: 'visibleArea-tool', |
| | | img: './images/addL/ksy.png' |
| | | }, { |
| | | name: '剖面分析', |
| | | classs: 'profileAnalysis-tool', |
| | | img: './images/addL/剖面分析.png' |
| | | } |
| | | , {//https://blog.csdn.net/supermapsupport/article/details/100134590 |
| | | //需要iServer发布成三维服务 |
| | | name: '坡度分析', |
| | | classs: 'slope-tool', |
| | | img: './images/addL/pdpx.png' |
| | | } |
| | | , {//做好静态, |
| | | name: '建造实体', |
| | | classs: 'modelDiagram-tool', |
| | | img: './images/addL/pdpx.png' |
| | | } |
| | | , {//SQL查询,//做好 |
| | | name: 'SQL查询', |
| | | classs: 'SQLQuery-tool', |
| | | img: './images/addL/pdpx.png' |
| | | }, |
| | | {//建造模型 |
| | | name: '建造模型', |
| | | classs: 'modesssssllll', |
| | | img: './images/addL/pdpx.png' |
| | | } |
| | | , |
| | | {//清除模型 |
| | | name: '清除模型', |
| | | classs: 'modesssss2222', |
| | | img: './images/addL/pdpx.png' |
| | | } |
| | | ]; |
| | | that.beginSpatialAnalysis(domHtmls); |
| | | var promise = false; |
| | | $('.modesssssllll').click(() => { |
| | | var URL_CONFIG = { |
| | | SCENE_CBD: 'http://www.supermapol.com/realspace/services/3D-CBDCache20200416/rest/realspace', |
| | | } |
| | | promise = this.map.scene.open(URL_CONFIG.SCENE_CBD); |
| | | }) |
| | | $('.modesssss2222').click(() => { |
| | | if (promise) { |
| | | Cesium.when(promise, function (layer) { |
| | | for (var i = 0; i < layer.length; i++) { |
| | | that.map.scene.layers.remove(layer[i].name) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | }, |
| | | beginSpatialAnalysis: function (domHtmls) { |
| | | var that = this; |
| | | var domHtmls = domHtmls; |
| | | var dom = $('#spatialAnalysis-mains'); |
| | | dom.empty(); |
| | | var str = '<ul>'; |
| | | for (var k in domHtmls) { |
| | | str += `<li class="${domHtmls[k].classs}"> |
| | | <i class="imgs"> |
| | |
| | | <span>${domHtmls[k].name}</span> |
| | | </li>` |
| | | } |
| | | dom.replaceWith(str); |
| | | str += '</ul>'; |
| | | dom.append(str); |
| | | // console.log(dom, str) |
| | | // dom.replaceWith(str); |
| | | |
| | | $('.closesspatialAnalysis').click(() => { |
| | | that.closeOnceUse(); |
| | | $('.jimu-widget-spatialAnalysis').hide(); |
| | | // // 关闭可视 |
| | | // topic.publish('closev', ''); |
| | | // // 关闭剖面 |
| | | // topic.publish('closep', ''); |
| | | // // 关闭坡度 |
| | | // topic.publish('closes', ''); |
| | | // $(".jimu-widget-visibleArea").hide(); |
| | | // $(".jimu-widget-profileAnalysis").hide(); |
| | | // $(".jimu-widget-slope").hide(); |
| | | }) |
| | | |
| | | }) |
| | | // 可视分析 |
| | | $('.visibleArea-tool').click(function () { |
| | | that.closeOnceUse(); |
| | | // that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // // 关闭量算 |
| | | // topic.publish('closeMeasurement', 'Measurement'); |
| | | // // 关闭卷帘 |
| | | // topic.publish('closeRolling', 'Rolling'); |
| | | // // 关闭分屏 |
| | | // topic.publish('closeSplitScreen', 'SplitScreen'); |
| | | // // 关闭标记 |
| | | // topic.publish('closeSign', 'Sign'); |
| | | // topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | // $('.jimu-widget-CoorPosition').hide(); |
| | | // $('.jimu-widget-MapPrinting').hide(); |
| | | // // 关闭可视 |
| | | // // topic.publish('closev', ''); |
| | | // // 关闭剖面 |
| | | // topic.publish('closep', ''); |
| | | // // 关闭坡度 |
| | | // topic.publish('closes', ''); |
| | | // $(".jimu-widget-profileAnalysis").hide(); |
| | | // $(".jimu-widget-slope").hide(); |
| | | // $('.tool-y-box').stop().hide(); |
| | | // //关闭飞行 |
| | | // $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | // topic.publish('closeFly', 'closeFly'); |
| | | |
| | | $(".jimu-widget-visibleArea").show(); |
| | | }) |
| | | // 剖面分析 |
| | | $('.profileAnalysis-tool').click(function () { |
| | | that.closeOnceUse(); |
| | | // that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // // 关闭量算 |
| | | // topic.publish('closeMeasurement', 'Measurement'); |
| | | // // 关闭卷帘 |
| | | // topic.publish('closeRolling', 'Rolling'); |
| | | // // 关闭分屏 |
| | | // topic.publish('closeSplitScreen', 'SplitScreen'); |
| | | // // 关闭标记 |
| | | // topic.publish('closeSign', 'Sign'); |
| | | // topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | // $('.jimu-widget-CoorPosition').hide(); |
| | | // $('.jimu-widget-MapPrinting').hide(); |
| | | // // 关闭可视 |
| | | // topic.publish('closev', ''); |
| | | // // 关闭剖面 |
| | | // // topic.publish('closep', ''); |
| | | // // 关闭坡度 |
| | | // topic.publish('closes', ''); |
| | | // $(".jimu-widget-visibleArea").hide(); |
| | | // $(".jimu-widget-slope").hide(); |
| | | // $('.tool-y-box').stop().hide(); |
| | | // //关闭飞行 |
| | | // $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | // topic.publish('closeFly', 'closeFly'); |
| | | |
| | | $(".jimu-widget-profileAnalysis").show(); |
| | | }) |
| | | //坡度分析 |
| | | $('.slope-tool').click(function () { |
| | | that.closeOnceUse(); |
| | | // that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // // 关闭量算 |
| | | // topic.publish('closeMeasurement', 'Measurement'); |
| | | // // 关闭卷帘 |
| | | // topic.publish('closeRolling', 'Rolling'); |
| | | // // 关闭分屏 |
| | | // topic.publish('closeSplitScreen', 'SplitScreen'); |
| | | // // 关闭标记 |
| | | // topic.publish('closeSign', 'Sign'); |
| | | // topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | // $('.jimu-widget-CoorPosition').hide(); |
| | | // $('.jimu-widget-MapPrinting').hide(); |
| | | // // 关闭可视 |
| | | // topic.publish('closev', ''); |
| | | // // 关闭剖面 |
| | | // topic.publish('closep', ''); |
| | | // // 关闭坡度 |
| | | // // topic.publish('closes', ''); |
| | | // $(".jimu-widget-visibleArea").hide(); |
| | | // $(".jimu-widget-profileAnalysis").hide(); |
| | | // $('.tool-y-box').stop().hide(); |
| | | // //关闭飞行 |
| | | // $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | // topic.publish('closeFly', 'closeFly'); |
| | | |
| | | $(".jimu-widget-slope").show(); |
| | | topic.publish('getbeginSlope', this.beginSlope); |
| | |
| | | //模型 |
| | | $('.modelDiagram-tool').click(function () { |
| | | that.closeOnceUse(); |
| | | // that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // // 关闭量算 |
| | | // topic.publish('closeMeasurement', 'Measurement'); |
| | | // // 关闭卷帘 |
| | | // topic.publish('closeRolling', 'Rolling'); |
| | | // // 关闭分屏 |
| | | // topic.publish('closeSplitScreen', 'SplitScreen'); |
| | | // // 关闭标记 |
| | | // topic.publish('closeSign', 'Sign'); |
| | | // topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | // $('.jimu-widget-CoorPosition').hide(); |
| | | // $('.jimu-widget-MapPrinting').hide(); |
| | | // // 关闭可视 |
| | | // topic.publish('closev', ''); |
| | | // // 关闭剖面 |
| | | // topic.publish('closep', ''); |
| | | // // 关闭坡度 |
| | | // // topic.publish('closes', ''); |
| | | // $(".jimu-widget-visibleArea").hide(); |
| | | // $(".jimu-widget-profileAnalysis").hide(); |
| | | // $('.tool-y-box').stop().hide(); |
| | | // $(".jimu-widget-slope").hide(); |
| | | // //关闭飞行 |
| | | // $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | // topic.publish('closeFly', 'closeFly'); |
| | | |
| | | $('.jimu-widget-modelDiagram').show(); |
| | | // topic.publish('getbeginSlope', this.beginSlope); |
| | | }) |
| | | //sql查询 |
| | | $('.SQLQuery-tool').click(function () { |
| | | that.closeOnceUse(); |
| | | $(".jimu-widget-SQLQuery").show(); |
| | | topic.publish('beginSQL', this.beginSQL); |
| | | |
| | | }) |
| | | |
| | | }, |
| | | |
| | | closeToolBox: function (item) { |
| | | if (item != this.name) { |
| | | $('.tool-y-box').hide(); |
| | |
| | | //清除实体 |
| | | this.map.entities.removeAll(); |
| | | $(".jimu-widget-modelDiagram").hide(); |
| | | //清除SQL查询 |
| | | $(".jimu-widget-SQLQuery").hide(); |
| | | topic.publish('closesSQL', 'closesSQL'); |
| | | |
| | | }, |
| | | onOpen: function () { |
| | | //面板打开的时候触发 (when open this panel trigger) |