| | |
| | | EventBus.on("select-geom", ({ geom, flyHeight, shouldShowFill }) => { |
| | | flyToHeight.value = flyHeight; |
| | | ShowFill.value = shouldShowFill; |
| | | console.log(ShowFill.value, "ShowFill.valueShowFill.value"); |
| | | const coordsStr = geom |
| | | .replace("MULTIPOLYGON(((", "") // 去掉开头 |
| | | .replace(")))", ""); // 去掉结尾 |
| | |
| | | hierarchy: Cesium.Cartesian3.fromDegreesArray( |
| | | geoJson.geometry.coordinates[0][0].flat() |
| | | ), |
| | | material: ShowFill |
| | | material: ShowFill |
| | | ? Cesium.Color.RED.withAlpha(0.3) // 半透明红色填充 |
| | | : new Cesium.ColorMaterialProperty(Cesium.Color.TRANSPARENT), // 如果不需要填充,则使用透明材质 |
| | | outline: true, |
| | |
| | | clampToGround: true, // 贴地显示 |
| | | }, |
| | | }); |
| | | |
| | | |
| | | previousEntities.push(polygonEntity); |
| | | |
| | | // 飞向中心点 |
| | |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | const validPaths = ["/", "/yhgl"]; |
| | | watch( |
| | | () => route.fullPath, |
| | | (val) => { |
| | | if (val != "/") { |
| | | if (!validPaths.includes(val)) { |
| | | // clusterLayer.dataSource.show = false |
| | | htmlEntityList.forEach((item) => { |
| | | item.show = false; |