zhaoxing
2022-10-21 8f5b493fa963a056888c89fa8b7f32fa980510e3
js/function.js
@@ -233,6 +233,7 @@
function mask_selection(regionCode){
    if(regionCode == 0){
      geoJsonLayer = new mars3d.layer.GeoJsonLayer({
      id:9999,
        url: "./data/shanghai.json",
        mask: true, //标识为遮罩层【重点参数】
        symbol: {
@@ -246,29 +247,31 @@
            arcType: Cesium.ArcType.GEODESIC,
            clampToGround: true,
          },
        },
        zIndex: 99999999999,
        }
      });
      map.addLayer(geoJsonLayer);
      // return
    }else{
 //geojson 各行政区边界线
 geoJsonLayer = new mars3d.layer.GeoJsonLayer({
  id:9999,
  url: "./data/"+regionCode+".geojson",
  mask: true, //标识为遮罩层【重点参数】
  symbol: {
    styleOptions: {
      fill: true,
      color: "rgb(2,26,79)",
      outline: true,
      outlineColor: "#39E09B",
      outlineWidth: 3,
      outlineOpacity: 0.5,
      arcType: Cesium.ArcType.GEODESIC,
      clampToGround: true,
    },
  },
});
map.addLayer(geoJsonLayer);
    }
    //geojson 各行政区边界线
      geoJsonLayer = new mars3d.layer.GeoJsonLayer({
        url: "./data/"+regionCode+".geojson",
        mask: true, //标识为遮罩层【重点参数】
        symbol: {
          styleOptions: {
            fill: true,
            color: "rgb(2,26,79)",
            outline: true,
            outlineColor: "#39E09B",
            outlineWidth: 3,
            outlineOpacity: 0.5,
            arcType: Cesium.ArcType.GEODESIC,
            clampToGround: true,
          },
        },
      });
      map.addLayer(geoJsonLayer);
}