| | |
| | | this.map.scene.globe.depthTestAgainstTerrain = true; |
| | | //取消双击事件 |
| | | this.map.cesiumWidget.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK); |
| | | |
| | | |
| | | //绘制水面事件 |
| | | $("#flood_hzsm_headtab").click(function () { |
| | | DrawDynamicClampGround.startDrawingPolyline(self.map, function (cartesians) { |
| | | if (self.drawingPolyline != undefined) |
| | |
| | | cartesians.splice(cartesians.length - 1, cartesians.length); |
| | | self.drawLines(cartesians); |
| | | self.movehandLer() |
| | | self.showDetail(true) |
| | | }); |
| | | }); |
| | | |
| | | $('#flood_qcsmx_headtab').click(function () { |
| | | self.map.entities.remove(self.drawingPolyline); |
| | | self.map.scene.primitives.remove(self.riverPrimitive); |
| | | self.showDetail(false) |
| | | }) |
| | | |
| | | |
| | |
| | | // $("#thematic_smxj_headtab").click(function () { |
| | | // self.offsetHeight(-Number($("#thematic_bhz_headtab").val()), 5); |
| | | // }); |
| | | $('#flood-detail-ksfx').click(function () { |
| | | self.floodAnalysisPopup() |
| | | }) |
| | | |
| | | |
| | | }, |
| | |
| | | prepareVertex: function () { |
| | | if (this.positions.length > 0) { |
| | | this.sideRes = this._lines2Plane(this.positions, this.riverWidth, this.riverHeight); |
| | | console.log(this.sideRes,"----000----") |
| | | } |
| | | }, |
| | | setPositions: function (e) { |
| | |
| | | $($('div.cesium-viewer').find('.cesium-baseLayerPicker-choices')[0]).children('div:eq(0)').trigger('click'); |
| | | $($('div.cesium-viewer').find('.cesium-baseLayerPicker-choices')[1]).children('div:eq(2)').trigger('click'); |
| | | |
| | | this.map.camera.flyTo({ |
| | | destination: Cesium.Cartesian3.fromDegrees(116.021604,25.893668, 50000), |
| | | }); |
| | | |
| | | this.showDetail(false) |
| | | |
| | | }, |
| | | |
| | | onClose: function () { |
| | |
| | | //点击事件 |
| | | clickHand:function (click){ |
| | | var pickedObjects = this.map.scene.pick(click.position); |
| | | if (pickedObjects.primitive instanceof Cesium.Primitive) { |
| | | this.canvasToImage() |
| | | if (pickedObjects && pickedObjects.primitive instanceof Cesium.Primitive) { |
| | | // this.canvasToImage() |
| | | this.floodAnalysisPopup() |
| | | } |
| | | }, |
| | |
| | | inPolygon.push(this.peoplePositionArray[i]) |
| | | } |
| | | } |
| | | var jsonStr = JSON.stringify(inPolygon) |
| | | |
| | | layer.open({ |
| | | title:'模拟分析', |
| | | title:'评估分析', |
| | | type: 2, |
| | | maxmin: false, //开启最大化最小化按钮 |
| | | area: ['1100px', '600px'], |
| | | skin: 'floodAnalysis', |
| | | offset: [top, left], |
| | | content: urlEvaluate, |
| | | content: urlEvaluate + "?data=" + encodeURIComponent(jsonStr),//使用encodeURIComponent转码,避免中文字符乱码,避免url截取错误 |
| | | id: "floodAnalysisLayer", |
| | | closeBtn: 1, |
| | | //把父页面数据传递给子弹窗并渲染 |
| | |
| | | var body = layer.getChildFrame("body",index); |
| | | //得到iframe页的窗口对象 |
| | | var iframeWin = window[layero.find('iframe')[0]['name']]; |
| | | console.log(iframeWin) |
| | | // //渲染子页面中的img |
| | | // iframeWin.$('#canvasImage')[0].src = self.canvasImage; |
| | | var table = "" |
| | |
| | | addPoint:function (){ |
| | | const url = './widgets/FloodAnalysis/data.json' |
| | | this.getJsonUrl(url) |
| | | }, |
| | | |
| | | showDetail:function(show){ |
| | | //显示详情 |
| | | if (show){ |
| | | $('.flood-detail').show() |
| | | }else { |
| | | $('.flood-detail').hide() |
| | | } |
| | | }, |
| | | |
| | | //判断点是否在多边形内部 |
| | |
| | | u8arr[n] = bstr.charCodeAt(n); |
| | | } |
| | | return new Blob([u8arr], { type: mime }); |
| | | } |
| | | }, |
| | | |
| | | |
| | | }); |