guonan
2025-05-29 cd5080b2e3d84c274f90bee762348be3f89e3c29
src/views/GisView.vue
@@ -64,7 +64,6 @@
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(")))", ""); // 去掉结尾
@@ -141,7 +140,7 @@
      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,
@@ -150,7 +149,7 @@
      clampToGround: true, // 贴地显示
    },
  });
  previousEntities.push(polygonEntity);
  // 飞向中心点
@@ -399,10 +398,12 @@
    });
  });
}
const validPaths = ["/", "/yhgl"];
watch(
  () => route.fullPath,
  (val) => {
    if (val != "/") {
    if (!validPaths.includes(val)) {
      // clusterLayer.dataSource.show = false
      htmlEntityList.forEach((item) => {
        item.show = false;