| | |
| | | this.$store.commit("description", obj); |
| | | } |
| | | |
| | | else if ( |
| | | else if (nPickFeature.id && |
| | | nPickFeature.id.fid && |
| | | nPickFeature.id.fid.includes("免费住所空间0131") |
| | | ) { |
| | |
| | | layuiLayer.close(SmartEarthPopupData.layerProp); |
| | | this.$store.commit("description", obj); |
| | | } |
| | | // else if (nPickFeature.primitive instanceof Cesium.Cesium3DTileset) { |
| | | // // let cartographic = |
| | | // // window.Viewer.scene.globe.ellipsoid.cartesianToCartographic( |
| | | // // nPickFeature.content.tile.boundingSphere.center |
| | | // // ); |
| | | // // let lon = Cesium.Math.toDegrees(cartographic.longitude); |
| | | // // let lat = Cesium.Math.toDegrees(cartographic.latitude); |
| | | // let p = sgworld.Navigate.getMouseDegrees(event); |
| | | // 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, |
| | | // "面" |
| | | else if (nPickFeature.primitive instanceof Cesium.Cesium3DTileset) { |
| | | // let cartographic = |
| | | // window.Viewer.scene.globe.ellipsoid.cartesianToCartographic( |
| | | // nPickFeature.content.tile.boundingSphere.center |
| | | // ); |
| | | // let lon = Cesium.Math.toDegrees(cartographic.longitude); |
| | | // let lat = Cesium.Math.toDegrees(cartographic.latitude); |
| | | |
| | | let p = sgworld.Navigate.getMouseDegrees(event); |
| | | let lon = p.lon; |
| | | let lat = p.lat; |
| | | |
| | | |
| | | axios |
| | | .get( |
| | | "http://10.10.4.121:8070/gisserver/wfsserver/yizhuang-buliding-wfs", |
| | | { |
| | | params: { |
| | | version: "1.3.0", |
| | | request: "GetFeature", |
| | | typename: `单体化SHP20241029_wgs84`, |
| | | 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]; |
| | | tooltipHTML = ""; |
| | | |
| | | for (let i in response.data.features[0].properties) { |
| | | let value = response.data.features[0].properties[i]; |
| | | |
| | | |
| | | value && (tooltipHTML += `<p>${i}:${value || "无"}</p>`); |
| | | } |
| | | |
| | | // if (tooltip) { |
| | | // tooltip.show(false); |
| | | // tooltip = null; |
| | | // } |
| | | // }); |
| | | // } |
| | | var tooltip = sgworld.Core.CreateResultTooltip(window.Viewer, { |
| | | color: "black", |
| | | addY: 0, |
| | | far: 200000, |
| | | closeBtn: true, |
| | | close: () => { |
| | | if (buildingPolygon) { |
| | | sgworld.Creator.DeleteObject(buildingPolygon); |
| | | buildingPolygon = null; |
| | | } |
| | | }, |
| | | }); |
| | | console.log(tooltipHTML); |
| | | |
| | | let description = `<div style=' border: 1px solid #fff;border-radius: 5px;background: rgba(0, 0, 0, 0.8);color: #fff;padding: 15px;'>${tooltipHTML}</div>`; |
| | | tooltip.showAt( |
| | | Cesium.Cartesian3.fromDegrees(p.lon, p.lat, 0), |
| | | description |
| | | ); |
| | | 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) => { |
| | | // return item.name == "行政区划图"; |
| | |
| | | |
| | | // axios |
| | | // .get( |
| | | // "http://10.10.4.116:8070/gisserver/rest/services/XingZhengQuHuaTu/MapServer/identify", |
| | | // "https://skyzt.bda.gov.cn/gisserver/rest/services/XingZhengQuHuaTu/MapServer/identify", |
| | | // { |
| | | // params: { |
| | | // geometry: `${p.lon},${p.lat}`, |