| | |
| | | ); |
| | | window.sxthandler.setInputAction((event) => { |
| | | let pick = sgworld.Viewer.scene.pick(event.position); |
| | | if (pick && pick.id && pick.id.tag == "sxt") { |
| | | //关闭地块信息弹窗 |
| | | Bus.$emit("closeLandInfoPop", true); |
| | | //结束之前操作 |
| | | layuiLayer.close(SmartEarthPopupData.layerProp); |
| | | |
| | | sgworld.drawObj && |
| | | (sgworld.drawObj.drawHandler && |
| | | sgworld.drawObj.drawHandler.destroy(), |
| | | sgworld.drawObj.end && sgworld.drawObj.end()); |
| | | |
| | | let props = pick.id.properties; |
| | | let screenHeight = |
| | | document.body.clientHeight || |
| | | document.documentElement.clientHeigh; |
| | | let offsetTop = screenHeight - 385; |
| | | offsetTop = offsetTop < 0 ? 0 : offsetTop; |
| | | |
| | | offsetTop = offsetTop > 100 ? offsetTop - 100 : offsetTop; |
| | | // console.log(props.installPla._value) |
| | | layerOpen(props.name._value, { |
| | | width: 470, |
| | | height: 385, |
| | | offset: [offsetTop + "px", "310px"], |
| | | url: |
| | | "./static/html/video/video.html?code=" + |
| | | props.cameraInde._value, |
| | | fn: { |
| | | success: (layero, index) => { |
| | | SmartEarthPopupData.layerContainer = layero; |
| | | }, |
| | | end: () => { |
| | | // this.isOpen.ymfx = false; |
| | | }, |
| | | cancel: () => { |
| | | sgworld.drawObj && |
| | | sgworld.drawObj.end && |
| | | sgworld.drawObj.end("cancel"); |
| | | }, |
| | | }, |
| | | }); |
| | | } |
| | | console.log(pick) |
| | | }, Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | }) |
| | | .catch((err) => { |
| | |
| | | lon = Cesium.Math.toDegrees(cartographic.longitude); |
| | | lat = Cesium.Math.toDegrees(cartographic.latitude); |
| | | } else { |
| | | |
| | | console.log(nPickFeature.id) |
| | | obj = nPickFeature.id.attributes; |
| | | lon = nPickFeature.id.positions[0]; |
| | | lat = nPickFeature.id.positions[1]; |
| | |
| | | let lon = p.lon; |
| | | let lat = p.lat; |
| | | |
| | | axios |
| | | .get( |
| | | "http://10.10.4.121:8070/gisserver/wfsserver/yizhuang-building-wfs-1207", |
| | | { |
| | | params: { |
| | | version: "1.3.0", |
| | | request: "GetFeature", |
| | | typename: `亦庄建筑外轮廓4326`, |
| | | propertyname: "*", |
| | | format: "json", |
| | | filter: `<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"><ogc:Intersects><ogc:PropertyName>SAHEP</ogc:PropertyName><gml:Point > <gml:pos>${lon} ${lat}</gml:pos></gml:Point></ogc:Intersects></ogc:Filter>`, |
| | | }, |
| | | } |
| | | ) |
| | | .then((response) => { |
| | | if (response.data.features.length > 0) { |
| | | var geometry = []; |
| | | let POIs = response.data.features[0].geometry.coordinates[0]; |
| | | for (let i = 0; i < POIs.length; i++) { |
| | | geometry.push({ |
| | | x: parseFloat(POIs[i][0]), |
| | | y: parseFloat(POIs[i][1]), |
| | | z: 0, |
| | | }); |
| | | } |
| | | buildingPolygon = sgworld.Creator.createPolygon( |
| | | geometry, |
| | | { |
| | | fillColor: "#00ff0050", |
| | | outlineColor: "#ff0000", |
| | | outlineWidth: 2, |
| | | }, |
| | | 1, |
| | | 0, |
| | | "面" |
| | | ); |
| | | } |
| | | }); |
| | | // axios |
| | | // .get( |
| | | // "http://10.10.4.121:8070/gisserver/wfsserver/yizhuang-building-wfs-1207", |
| | | // { |
| | | // params: { |
| | | // version: "1.3.0", |
| | | // request: "GetFeature", |
| | | // typename: `亦庄建筑外轮廓4326`, |
| | | // propertyname: "*", |
| | | // format: "json", |
| | | // filter: `<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"><ogc:Intersects><ogc:PropertyName>SAHEP</ogc:PropertyName><gml:Point > <gml:pos>${lon} ${lat}</gml:pos></gml:Point></ogc:Intersects></ogc:Filter>`, |
| | | // }, |
| | | // } |
| | | // ) |
| | | // .then((response) => { |
| | | // if (response.data.features.length > 0) { |
| | | // var geometry = []; |
| | | // let POIs = response.data.features[0].geometry.coordinates[0]; |
| | | // for (let i = 0; i < POIs.length; i++) { |
| | | // geometry.push({ |
| | | // x: parseFloat(POIs[i][0]), |
| | | // y: parseFloat(POIs[i][1]), |
| | | // z: 0, |
| | | // }); |
| | | // } |
| | | // buildingPolygon = sgworld.Creator.createPolygon( |
| | | // geometry, |
| | | // { |
| | | // fillColor: "#00ff0050", |
| | | // outlineColor: "#ff0000", |
| | | // outlineWidth: 2, |
| | | // }, |
| | | // 1, |
| | | // 0, |
| | | // "面" |
| | | // ); |
| | | // } |
| | | // }); |
| | | } |
| | | // else if (nPickFeature.primitive instanceof Cesium.GroundPrimitive) { |
| | | // let wmsLayer = this.$store.state.selectedLayers.filter((item) => { |