| | |
| | | |
| | | }, |
| | | 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 () { |
| | | |