Merge branch 'master' of http://192.168.0.105:10010/r/pyhmap
13 files modified
8 files added
| | |
| | | }, |
| | | { |
| | | "name": "视角底部按钮", |
| | | "uri": "widgets/visualAngle/Widget" |
| | | "uri": "widgets/visualAngle/Widget", |
| | | "position": { |
| | | "right": 168, |
| | | "top": 20, |
| | | "height": "36px", |
| | | "width": "142px", |
| | | "relativeTo": "map" |
| | | } |
| | | }, |
| | | { |
| | | "name": "图例", |
| | |
| | | { |
| | | "name": "搜索弹窗表格各项弹窗", |
| | | "uri": "widgets/searchTabaPopup/Widget" |
| | | }, { |
| | | }, |
| | | { |
| | | "name": "图层管理", |
| | | "uri": "widgets/Layermanagement/Widget" |
| | | }, |
| | | { |
| | | "name": "空间分析", |
| | | "uri": "widgets/spatialAnalysis/Widget" |
| | | }, |
| | | { |
| | | "name": "可视化分析", |
| | |
| | | "name": "剖面分析", |
| | | "uri": "widgets/profileAnalysis/Widget" |
| | | } |
| | | |
| | | |
| | | ], |
| | | "groups": [], |
| | | "panel": { |
| | |
| | | <li class="sign-tool"><i></i> <span>我的标记</span></li> |
| | | <li class="CoorPosition-tool"><i></i> <span>坐标定位</span></li> |
| | | <li class="MapPrinting-tool"><i></i> <span>场景快照</span></li> |
| | | <li class="visibleArea-tool"><i></i> <span>可视分析</span></li> |
| | | <li class="spatialAnalysis-tool"><i></i> <span>空间分析</span></li> |
| | | <!-- <li class="visibleArea-tool"><i></i> <span>可视分析</span></li> |
| | | <li class="profileAnalysis-tool"><i></i> <span>剖面分析</span></li> |
| | | <li class="slope-tool"><i></i> <span>坡度分析</span></li> |
| | | <li class="slope-tool"><i></i> <span>坡度分析</span></li> --> |
| | | <!-- <li class="superposition-tool"><i></i> <span>叠加分析</span></li> |
| | | <li class="buffer-tool"><i></i> <span>缓冲分析</span></li> --> |
| | | </ul> |
| | |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | $('.tool-y-box').stop().hide(); |
| | | $(".jimu-widget-spatialAnalysis").hide(); |
| | | |
| | | $('.jimu-widget-Measurement').show(); |
| | | |
| | |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | $('.tool-y-box').stop().hide(); |
| | | $(".jimu-widget-spatialAnalysis").hide(); |
| | | |
| | | topic.publish('openRolling', 'Rolling'); |
| | | |
| | |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | $('.tool-y-box').stop().hide(); |
| | | $(".jimu-widget-spatialAnalysis").hide(); |
| | | |
| | | topic.publish('openSplitScreen', 'SplitScreen'); |
| | | |
| | |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | $('.tool-y-box').stop().hide(); |
| | | $(".jimu-widget-spatialAnalysis").hide(); |
| | | |
| | | topic.publish('openSign', 'Sign'); |
| | | |
| | |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | $('.tool-y-box').stop().hide(); |
| | | $(".jimu-widget-spatialAnalysis").hide(); |
| | | |
| | | $('.jimu-widget-CoorPosition').show(); |
| | | |
| | |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | $('.tool-y-box').stop().hide(); |
| | | $(".jimu-widget-spatialAnalysis").hide(); |
| | | |
| | | $('.jimu-widget-MapPrinting').show(); |
| | | |
| | | |
| | | }) |
| | | |
| | | // 可视分析 |
| | | $('.visibleArea-tool').click(function () { |
| | | // 空间分析 |
| | | $('.spatialAnalysis-tool').click(function () { |
| | | that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // 关闭量算 |
| | | topic.publish('closeMeasurement', 'Measurement'); |
| | |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | // 关闭可视 |
| | | // topic.publish('closev', ''); |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | $('.tool-y-box').stop().hide(); |
| | | |
| | | $(".jimu-widget-visibleArea").show(); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | |
| | | $(".jimu-widget-spatialAnalysis").show(); |
| | | }) |
| | | |
| | | // // 可视分析 |
| | | // $('.visibleArea-tool').click(function () { |
| | | // 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', ''); |
| | | // $(".jimu-widget-profileAnalysis").hide(); |
| | | // $(".jimu-widget-slope").hide(); |
| | | // $('.tool-y-box').stop().hide(); |
| | | |
| | | // $(".jimu-widget-visibleArea").show(); |
| | | // }) |
| | | // 剖面分析 |
| | | $('.profileAnalysis-tool').click(function () { |
| | | 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', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | $('.tool-y-box').stop().hide(); |
| | | // $('.profileAnalysis-tool').click(function () { |
| | | // 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', ''); |
| | | // $(".jimu-widget-visibleArea").hide(); |
| | | // $(".jimu-widget-slope").hide(); |
| | | // $('.tool-y-box').stop().hide(); |
| | | |
| | | $(".jimu-widget-profileAnalysis").show(); |
| | | }) |
| | | // $(".jimu-widget-profileAnalysis").show(); |
| | | // }) |
| | | //坡度分析 |
| | | $('.slope-tool').click(function () { |
| | | 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', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $('.tool-y-box').stop().hide(); |
| | | // $('.slope-tool').click(function () { |
| | | // 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', ''); |
| | | // $(".jimu-widget-visibleArea").hide(); |
| | | // $(".jimu-widget-profileAnalysis").hide(); |
| | | // $('.tool-y-box').stop().hide(); |
| | | |
| | | $(".jimu-widget-slope").show(); |
| | | topic.publish('getbeginSlope', this.beginSlope); |
| | | }) |
| | | // $(".jimu-widget-slope").show(); |
| | | // topic.publish('getbeginSlope', this.beginSlope); |
| | | // }) |
| | | |
| | | }, |
| | | |
| | |
| | | /* 240px */ |
| | | background: rgb(254, 254, 254); |
| | | color: #838383; |
| | | border-radius: 6px 0 0 6px; |
| | | /* border-radius: 6px 0 0 6px; */ |
| | | text-align: center; |
| | | cursor: pointer; |
| | | z-index: 11 !important |
| | | z-index: 13 !important |
| | | } |
| | | |
| | | .jimu-widget-Tool .tool-bar { |
| | |
| | | .jimu-widget-profileAnalysis { |
| | | position: fixed !important; |
| | | top: 72px !important; |
| | | right: 60px !important; |
| | | right: 383px !important; |
| | | width: 200px !important; |
| | | height: 40px !important; |
| | | background-color: rgb(255, 255, 255); |
| | | font-size: 14px; |
| | | color: rgb(0, 0, 0); |
| | | font-size: 16px; |
| | | z-index: 11 !important; |
| | | z-index: 12 !important; |
| | | border-radius: 10px; |
| | | display: none; |
| | | box-shadow: 0 0 8px #fff; |
| | |
| | | <div> |
| | | <div id="float" |
| | | style="background:#95e8f9;width: 250px;height: 470px;top: 15px;left: 1.5%;opacity: 1"> |
| | | <div id="con" style="background:#95e8f9;width: 230px;height: 450px;top: 85px;left: 1.1%;margin: 10px"> |
| | | <div id="float"> |
| | | <div id="con"> |
| | | <label for="calMode">1、计算模式:</label> |
| | | <select id="calMode"> |
| | | <option value="calModeall_plane">指定多边形区域</option> |
| | |
| | | <label><input type="radio" id="showall" name="fill" checked="checked">填充颜色和坡向箭头</label> |
| | | <label>4、颜色条带:</label> |
| | | <div id="bar"> |
| | | <select id="colorTable1" class="selectpicker"> |
| | | <select id="colorTable12" class="selectpicker"> |
| | | <option value="1" data-content="<span class='label band4'> </span>"> </option> |
| | | <option value="2" data-content="<span class='label band2'> </span>"> </option> |
| | | <option value="3" data-content="<span class='label band3'> </span>"> </option> |
| | |
| | | |
| | | }, |
| | | beginSlope: function () { |
| | | console.log('beginSlope'); |
| | | // console.log('beginSlope'); |
| | | var that = this; |
| | | var viewer = that.map; |
| | | var scene = viewer.scene; |
| | | scene.globe.enableLighting = true; |
| | | //添加SuperMap iServer发布的影像服务 |
| | | viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({ |
| | | url: 'http://www.supermapol.com/realspace/services/3D-ZF_normal/rest/realspace/datas/image' |
| | | })); |
| | | // viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({ |
| | | // url: 'http://www.supermapol.com/realspace/services/3D-ZF_normal/rest/realspace/datas/image' |
| | | // })); |
| | | // viewer.scene.camera.setView({ |
| | | // destination: Cesium.Cartesian3.fromDegrees(87.1, 27.8, 8000.0), |
| | | // orientation: { |
| | |
| | | var wide; |
| | | wide = Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION; |
| | | slope.ColorTable = colorTable; |
| | | slope.Opacity = 0.5; |
| | | slope.Opacity = 1; |
| | | |
| | | function createTooltip(frameDiv) {//创建需要的函数 |
| | | |
| | |
| | | }); |
| | | handlerPolygon.activate(); |
| | | document.getElementById("cance").onclick = function () { |
| | | // console.log('cance') |
| | | viewer.scene.globe.SlopeSetting = { |
| | | slopeSetting: slope, |
| | | analysisMode: Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_NONE |
| | | }; |
| | | handlerPolygon.polygon.show = false; |
| | | handlerPolygon.polyline.show = false; |
| | | scene.globe.enableLighting = false; |
| | | |
| | | //关闭该绘画图层 |
| | | // handlerPolygon.clear(); |
| | | |
| | | }; |
| | | viewer._cesiumWidget._creditContainer.style.display = "none"; |
| | | $("#split").on("click", function () { |
| | |
| | | }; |
| | | } |
| | | ) |
| | | $("#colorTable1").on("input change", function () { |
| | | $("#colorTable12").on("input change", function () { |
| | | colorTable.remove(0); |
| | | colorTable.remove(20); |
| | | colorTable.remove(30); |
| | | colorTable.remove(50); |
| | | colorTable.remove(80); |
| | | var value = document.getElementById("colorTable1").selectedIndex; |
| | | var value = document.getElementById("colorTable12").selectedIndex; |
| | | switch (value) { |
| | | case 0: |
| | | colorTable.insert(0, new Cesium.Color(9 / 255, 9 / 255, 255 / 255)); |
| | |
| | | $('#toolbar').show(); |
| | | $('#btnContainer').show(); |
| | | $('#loadingbar').remove(); |
| | | that.handlerPolygon = handlerPolygon; |
| | | that.viewer = viewer; |
| | | that.scene = scene; |
| | | that.slope = slope; |
| | | topic.subscribe("closes", lang.hitch(this, this.closes)); |
| | | }, |
| | | handlerPolygon: '', |
| | | viewer: '', |
| | | scene: '', |
| | | closes: function () { |
| | | // 关闭绘画层 |
| | | this.viewer.scene.globe.SlopeSetting = { |
| | | slopeSetting: this.slope, |
| | | analysisMode: Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_NONE |
| | | }; |
| | | // handlerPolygon.polygon.show = false; |
| | | // handlerPolygon.polyline.show = false; |
| | | this.scene.globe.enableLighting = false; |
| | | this.handlerPolygon.clear(); |
| | | |
| | | }, |
| | | onOpen: function () { |
| | | |
| | |
| | | .jimu-widget-slope { |
| | | position: fixed !important; |
| | | top: 72px !important; |
| | | right: 60px !important; |
| | | right: 388px !important; |
| | | width: 200px !important; |
| | | height: 40px !important; |
| | | background-color: rgb(255, 255, 255); |
| | | font-size: 14px; |
| | | color: rgb(0, 0, 0); |
| | | font-size: 16px; |
| | | z-index: 11 !important; |
| | | z-index: 12 !important; |
| | | border-radius: 10px; |
| | | display: none; |
| | | box-shadow: 0 0 8px #fff; |
| | |
| | | |
| | | .jimu-widget-slope #float { |
| | | position: relative !important; |
| | | top: 50px !important; |
| | | left: -60px !important; |
| | | top: -10px !important; |
| | | left: -50px !important; |
| | | background-color: rgb(255, 255, 255) !important; |
| | | font-size: 16px; |
| | | color: rgb(0, 0, 0); |
| | | border-radius: 5px; |
| | | box-shadow: 0 0 8px #fff; |
| | | width: 250px; |
| | | height: 470px; |
| | | opacity: 1; |
| | | } |
| | | |
| | | .jimu-widget-slope #float #con { |
| | | width: 230px; |
| | | height: 450px; |
| | | top: 85px; |
| | | left: 1.1%; |
| | | margin: 10px; |
| | | } |
| | | |
| | | .drawCur { |
| | | cursor: url(../../../images/addL/draw.cur), auto; |
| | | } |
| New file |
| | |
| | | <div> |
| | | <div class="heards"> |
| | | 空间分析 |
| | | <i class="layui-icon closesspatialAnalysis"> |
| | | ဆ |
| | | </i> |
| | | </div> |
| | | <div class="main"> |
| | | <ul id="spatialAnalysis-main"> |
| | | <!-- <li class="visibleArea-tool"><i></i> <span>可视分析</span></li> |
| | | <li class="profileAnalysis-tool"><i></i> <span>剖面分析</span></li> |
| | | <li class="slope-tool"><i></i> <span>坡度分析</span></li> --> |
| | | </ul> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | /////////////////////////////////////////////////////////////////////////// |
| | | // Copyright © 2019 zhongsong. All Rights Reserved. |
| | | // 模块描述:显示坐标 |
| | | /////////////////////////////////////////////////////////////////////////// |
| | | 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' |
| | | ], |
| | | function (declare, |
| | | lang, |
| | | array, |
| | | html, |
| | | topic, |
| | | BaseWidget, |
| | | aspect, |
| | | string, |
| | | utils |
| | | ) { |
| | | return declare([BaseWidget], { |
| | | baseClass: 'jimu-widget-spatialAnalysis', |
| | | name: 'spatialAnalysis', |
| | | layers: {}, |
| | | startup: function () { |
| | | var that = this; |
| | | // 暴露在外的接口 |
| | | |
| | | var domHtmls = [ |
| | | { |
| | | name: '可视分析', |
| | | classs: 'visibleArea-tool' |
| | | }, { |
| | | name: '剖面分析', |
| | | classs: 'profileAnalysis-tool' |
| | | }, { |
| | | name: '坡度分析', |
| | | classs: 'slope-tool' |
| | | } |
| | | ]; |
| | | var dom = $('#spatialAnalysis-main'); |
| | | var str = ''; |
| | | for (var k in domHtmls) { |
| | | str += `<li class="${domHtmls[k].classs}"> |
| | | <i></i> |
| | | <span>${domHtmls[k].name}</span> |
| | | </li>` |
| | | } |
| | | dom.replaceWith(str); |
| | | |
| | | $('.closesspatialAnalysis').click(() => { |
| | | $('.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(); |
| | | }) |
| | | |
| | | |
| | | // topic.subscribe("closeTool", lang.hitch(this, this.closeToolBox)); |
| | | // this.inherited(arguments); |
| | | // $('.tool-bar .tool-btn span').click(function () { |
| | | // topic.publish('closeMap', this.name); |
| | | // topic.publish('closeZtree', this.name); |
| | | // $('.tool-y-box').toggle(); |
| | | // }) |
| | | |
| | | // 可视分析 |
| | | $('.visibleArea-tool').click(function () { |
| | | 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-visibleArea").show(); |
| | | }) |
| | | // 剖面分析 |
| | | $('.profileAnalysis-tool').click(function () { |
| | | 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-profileAnalysis").show(); |
| | | }) |
| | | //坡度分析 |
| | | $('.slope-tool').click(function () { |
| | | 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").show(); |
| | | topic.publish('getbeginSlope', this.beginSlope); |
| | | }) |
| | | |
| | | }, |
| | | |
| | | closeToolBox: function (item) { |
| | | if (item != this.name) { |
| | | $('.tool-y-box').hide(); |
| | | } |
| | | }, |
| | | |
| | | onOpen: function () { |
| | | //面板打开的时候触发 (when open this panel trigger) |
| | | // var domHtmls = [ |
| | | // { |
| | | // name: '可视分析', |
| | | // classs: 'visibleArea-tool' |
| | | // }, { |
| | | // name: '剖面分析', |
| | | // classs: 'profileAnalysis-tool' |
| | | // }, { |
| | | // name: '坡度分析', |
| | | // classs: 'slope-tool' |
| | | // }, |
| | | // ]; |
| | | // var dom = $('#spatialAnalysis-main'); |
| | | // var str = ''; |
| | | // for (var k in domHtmls) { |
| | | // str += `<li class="${domHtmls[k].classs}"><i></i> <span>${domHtmls[k].name}</span></li>` |
| | | // } |
| | | // dom.replaceWith(str); |
| | | }, |
| | | |
| | | 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); |
| | | } |
| | | |
| | | }); |
| | | }); |
| New file |
| | |
| | | .jimu-widget-spatialAnalysis { |
| | | position: absolute !important; |
| | | font-size: 14px; |
| | | height: 398px !important; |
| | | width: 318px !important; |
| | | /* 240px */ |
| | | background: rgb(254, 254, 254); |
| | | color: #838383; |
| | | border-radius: 6px; |
| | | text-align: center; |
| | | /* cursor: pointer; */ |
| | | z-index: 11 !important; |
| | | top: 72px !important; |
| | | bottom: auto !important; |
| | | right: 60px !important; |
| | | left: auto !important; |
| | | box-shadow: 0 0 8px #fff; |
| | | display: none; |
| | | } |
| | | |
| | | .jimu-widget-spatialAnalysis .closesspatialAnalysis { |
| | | position: absolute; |
| | | top: 0px; |
| | | right: 10px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .jimu-widget-spatialAnalysis .closesspatialAnalysis:hover { |
| | | color: red; |
| | | } |
| | | |
| | | .jimu-widget-spatialAnalysis .heards { |
| | | height: 40px; |
| | | width: 100%; |
| | | background-color: #39A5FD; |
| | | box-shadow: 0 0 10px #39A5FD; |
| | | color: #fff; |
| | | font-size: 16px; |
| | | line-height: 40px; |
| | | border-radius: 6px 6px 0 0; |
| | | } |
| | | |
| | | .jimu-widget-spatialAnalysis .main { |
| | | padding: 5px; |
| | | text-align: center; |
| | | overflow: hidden; |
| | | height: calc(100% - 40px); |
| | | width: 100%; |
| | | margin: 0; |
| | | overflow: auto; |
| | | } |
| | | |
| | | .jimu-widget-spatialAnalysis li { |
| | | position: relative; |
| | | left: 6px; |
| | | top: 5px; |
| | | float: left; |
| | | cursor: pointer; |
| | | user-select: none; |
| | | min-width: 62px; |
| | | height: 96px; |
| | | width: 90px; |
| | | box-sizing: border-box; |
| | | margin: 0 10px 10px 0; |
| | | text-align: center; |
| | | padding-top: 12px; |
| | | border: 1px solid rgb(255, 255, 255); |
| | | box-shadow: 2px 2px 15px -5px #39A5FD; |
| | | color: #555 |
| | | } |
| | | |
| | | .jimu-widget-spatialAnalysis li:hover { |
| | | background-color: #ffffff; |
| | | box-shadow: 3px 3px 20px -4px #0b8af1; |
| | | } |
| New file |
| | |
| | | { |
| | | "name": "spatialAnalysis", |
| | | "2D": true, |
| | | "3D": true, |
| | | "platform": "HTML", |
| | | "version": "2.10", |
| | | "wabVersion": "2.10", |
| | | "author": "yuanjy", |
| | | "description": "", |
| | | "copyright": "", |
| | | "license": "", |
| | | "properties": { |
| | | "hasConfig": false, |
| | | "inPanel": false, |
| | | "hasVersionManager": false |
| | | } |
| | | } |
| New file |
| | |
| | | define( |
| | | ({ |
| | | _widgetLabel: "spatialAnalysis" |
| | | }) |
| | | ); |
| New file |
| | |
| | | define({ |
| | | root: ({ |
| | | _widgetLabel: "spatialAnalysis" |
| | | }), |
| | | "es": 1, |
| | | "zh-cn": 1 |
| | | }); |
| New file |
| | |
| | | define( |
| | | ({ |
| | | _widgetLabel: "空间分析" |
| | | }) |
| | | ); |
| | |
| | | // 先将此标记置为true,不激活鼠标移动事件中对可视域分析对象的操作 |
| | | scene.viewFlag = true; |
| | | var pointHandler = new Cesium.DrawHandler(viewer, Cesium.DrawMode.Point); |
| | | |
| | | // 创建可视域分析对象 |
| | | var viewshed3D = new Cesium.ViewShed3D(scene); |
| | | var colorStr1 = viewshed3D.visibleAreaColor.toCssColorString(); |
| | |
| | | viewer.entities.removeAll(); |
| | | viewshed3D.distance = 0.1; |
| | | scene.viewFlag = true; |
| | | // pointHandler.clear(); |
| | | }) |
| | | |
| | | $('.jimu-widget-visibleArea').find(".closes").click(function () { |
| | |
| | | viewer.entities.removeAll(); |
| | | viewshed3D.distance = 0.1; |
| | | scene.viewFlag = true; |
| | | pointHandler.clear(); |
| | | }) |
| | | // console.log(scene) |
| | | this.viewer = viewer; |
| | | this.viewshed3D = viewshed3D; |
| | | this.scene = scene; |
| | | this.pointHandler = pointHandler; |
| | | |
| | | topic.subscribe("closev", lang.hitch(this, this.closev)); |
| | | }, |
| | | viewer: '', |
| | | viewshed3D: '', |
| | | scene: '', |
| | | pointHandler: '', |
| | | closev: function () { |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $("#wrapper").hide(); |
| | | this.viewer.entities.removeAll(); |
| | | this.viewshed3D.distance = 0.1; |
| | | this.scene.viewFlag = true; |
| | | this.pointHandler.clear(); |
| | | }, |
| | | onOpen: function () { |
| | | |
| | |
| | | .jimu-widget-visibleArea { |
| | | position: fixed !important; |
| | | top: 72px !important; |
| | | right: 60px !important; |
| | | right: 383px !important; |
| | | width: 200px !important; |
| | | height: 40px !important; |
| | | background-color: rgb(255, 255, 255); |
| | | font-size: 14px; |
| | | color: rgb(0, 0, 0); |
| | | font-size: 16px; |
| | | z-index: 11; |
| | | z-index: 12 !important; |
| | | border-radius: 10px; |
| | | display: none; |
| | | box-shadow: 0 0 8px #fff; |
| | |
| | | <div> |
| | | <div class="visualAngleOnce v-a-One on"> |
| | | <!-- <div class="visualAngleOnce v-a-One on" > |
| | | <img class="v-a-o-img" src="./images/自主体验-1.png" alt=""> |
| | | <div class="v-a-o-title">自主体验</div> |
| | | </div> |
| | | <div class="v-a-o-title">自主</div> |
| | | </div> --> |
| | | <div class="visualAngleOnce v-a-Two"> |
| | | <img class="v-a-o-img" src="./images/漫游体验.png" alt=""> |
| | | <div class="v-a-o-title">漫游体验</div> |
| | | <div class="v-a-o-title">漫游</div> |
| | | </div> |
| | | <div class="visualAngleOnce v-a-Three"> |
| | | <div class="visualAngleOnce v-a-Three" style="border-right: 1px solid #DDDDDD;"> |
| | | <img class="v-a-o-img" src="./images/固定视角.png" alt=""> |
| | | <div class="v-a-o-title">固定视角</div> |
| | | <div class="v-a-o-title">固定</div> |
| | | </div> |
| | | </div> |
| | |
| | | // 模块描述:显示坐标 |
| | | /////////////////////////////////////////////////////////////////////////// |
| | | 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, |
| | |
| | | layers: {}, |
| | | startup: function () { |
| | | // 暴露在外的接口 |
| | | var that = this; |
| | | $(".v-a-One").click(function () { |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | $(this).addClass('on').siblings().removeClass('on'); |
| | | // 控制视角平移: |
| | | that.map.scene.screenSpaceCameraController.enableRotate = true; |
| | | var that = this, |
| | | isFixed = false, |
| | | isFly = false |
| | | , noFixed = () => { |
| | | // $(this).addClass('on').siblings().removeClass('on'); |
| | | // 控制视角平移: |
| | | that.map.scene.screenSpaceCameraController.enableRotate = true; |
| | | // true: 允许左键按下视角平移; |
| | | // false: 禁止左键按下视角平移; |
| | | // 控制视角缩放: |
| | | that.map.scene.screenSpaceCameraController.enableZoom = true; |
| | | // true: 允许中键缩放视角; |
| | | // false:禁止中键缩放视角; |
| | | // 控制视角旋转: |
| | | that.map.scene.screenSpaceCameraController.enableTilt = true; |
| | | // true:允许视角旋转; |
| | | // false:禁止视角旋转; |
| | | }; |
| | | |
| | | // true: 允许左键按下视角平移; |
| | | // $(".v-a-One").click(function () { |
| | | // topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | // $(this).addClass('on').siblings().removeClass('on'); |
| | | // // 控制视角平移: |
| | | // that.map.scene.screenSpaceCameraController.enableRotate = true; |
| | | // // true: 允许左键按下视角平移; |
| | | // // false: 禁止左键按下视角平移; |
| | | // // 控制视角缩放: |
| | | // that.map.scene.screenSpaceCameraController.enableZoom = true; |
| | | // // true: 允许中键缩放视角; |
| | | // // false:禁止中键缩放视角; |
| | | // // 控制视角旋转: |
| | | // that.map.scene.screenSpaceCameraController.enableTilt = true; |
| | | // // true:允许视角旋转; |
| | | // // false:禁止视角旋转; |
| | | |
| | | // false: 禁止左键按下视角平移; |
| | | |
| | | // 控制视角缩放: |
| | | that.map.scene.screenSpaceCameraController.enableZoom = true; |
| | | |
| | | // true: 允许中键缩放视角; |
| | | |
| | | // false:禁止中键缩放视角; |
| | | |
| | | // 控制视角旋转: |
| | | that.map.scene.screenSpaceCameraController.enableTilt = true; |
| | | |
| | | // true:允许视角旋转; |
| | | |
| | | // false:禁止视角旋转; |
| | | |
| | | }) |
| | | // }) |
| | | $(".v-a-Two").click(function () { |
| | | $(this).addClass('on').siblings().removeClass('on'); |
| | | |
| | | // 关闭量算 |
| | | topic.publish('closeMeasurement', 'Measurement'); |
| | | // 关闭卷帘 |
| | |
| | | // 飞行路线 |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | |
| | | topic.publish('openFlyRoute', 'FlyRoute'); |
| | | |
| | | $('.tool-y-box').stop().hide(); |
| | | |
| | | noFixed(); |
| | | if (isFly) { |
| | | $(this).removeClass('on'); |
| | | console.log('关闭飞行') |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | } else { |
| | | $(this).addClass('on').siblings().removeClass('on'); |
| | | console.log('开启飞行') |
| | | topic.publish('openFlyRoute', 'FlyRoute'); |
| | | } |
| | | isFixed = false; |
| | | isFly = !isFly; |
| | | }) |
| | | $(".v-a-Three").click(function () { |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | $(this).addClass('on').siblings().removeClass('on'); |
| | | that.map.scene.screenSpaceCameraController.enableRotate = false |
| | | that.map.scene.screenSpaceCameraController.enableZoom = true |
| | | that.map.scene.screenSpaceCameraController.enableTilt = false |
| | | if (isFixed) { |
| | | $(this).removeClass('on'); |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | noFixed(); |
| | | console.log('关闭固定') |
| | | } else { |
| | | console.log('开启固定') |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | $(this).addClass('on').siblings().removeClass('on'); |
| | | that.map.scene.screenSpaceCameraController.enableRotate = false |
| | | that.map.scene.screenSpaceCameraController.enableZoom = true |
| | | that.map.scene.screenSpaceCameraController.enableTilt = false |
| | | } |
| | | isFly = false; |
| | | isFixed = !isFixed; |
| | | }) |
| | | |
| | | }, |
| | |
| | | .jimu-widget-visualAngle { |
| | | position: fixed; |
| | | font-size: 14px; |
| | | height: 72px !important; |
| | | /* height: 72px !important; */ |
| | | /* line-height : 32px; */ |
| | | width: 216px !important; |
| | | right: auto !important; |
| | | top: auto !important; |
| | | bottom: 30px !important; |
| | | left: calc(50% - 90px) !important; |
| | | /* width: 216px !important; */ |
| | | /* right: auto !important; */ |
| | | /* top: auto !important; */ |
| | | /* bottom: 30px !important; */ |
| | | /* left: calc(50% - 90px) !important; */ |
| | | /* 240px */ |
| | | background: rgba(255, 255, 255, 1); |
| | | background: rgba(254, 254, 254, 1); |
| | | /* border : 1px solid #000; */ |
| | | border-radius: 6px; |
| | | border-radius: 6px 0 0 6px; |
| | | text-align: center; |
| | | /* cursor : pointer; */ |
| | | z-index: 10 !important; |
| | | z-index: 13 !important; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | width: 72px; |
| | | box-sizing: border-box; |
| | | /* border: 1px solid springgreen; */ |
| | | height: 72px; |
| | | height: 36px; |
| | | cursor: pointer; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | flex-direction: column; |
| | | /* flex-direction: column; */ |
| | | font-size: 13px; |
| | | |
| | | } |
| | | |
| | | .jimu-widget-visualAngle .visualAngleOnce .v-a-o-title { |
| | | color: #969696 !important; |
| | | position: relative; |
| | | left: 3px; |
| | | } |
| | | |
| | | .jimu-widget-visualAngle .visualAngleOnce.on { |
| | | background-color: #3F9DFD; |
| | | } |
| | | |
| | | .jimu-widget-visualAngle .visualAngleOnce.on img, |
| | | .jimu-widget-visualAngle .visualAngleOnce.on div { |
| | | .jimu-widget-visualAngle .visualAngleOnce.on img, .jimu-widget-visualAngle .visualAngleOnce.on div { |
| | | filter: grayscale(100%) brightness(200%); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .jimu-widget-visualAngle .visualAngleOnce:nth-child(3) { |
| | | border-radius: 0 6px 6px 0; |
| | | /* border-radius: 0 6px 6px 0; */ |
| | | border-left: 1px solid rgba(155, 155, 155, 0.2); |
| | | } |
| | | |
| | | .jimu-widget-visualAngle .v-a-o-img { |
| | | position: relative; |
| | | top: 5px; |
| | | left: -2px; |
| | | width: 20px; |
| | | margin-bottom: 8px; |
| | | } |