wangrong
2022-10-24 ab663303cf980d26b436bd16ce379c0ce0ad9d4d
js/function.js
@@ -232,8 +232,47 @@
function mask_selection(regionCode){
    if(regionCode == 0){
      return
      geoJsonLayer = new mars3d.layer.GeoJsonLayer({
      id:9999,
        url: "./data/shanghai.json",
        mask: true, //标识为遮罩层【重点参数】
        symbol: {
          styleOptions: {
            fill: true,
            color: "rgb(2,26,79)",
            outline: true,
            outlineColor: "#39E09B",
            outlineWidth: 3,
            outlineOpacity: 0.8,
            arcType: Cesium.ArcType.GEODESIC,
            clampToGround: true,
          },
        }
      });
      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);
    }
<<<<<<< HEAD
    debugger;
    //geojson 各行政区边界线
      geoJsonLayer = new mars3d.layer.GeoJsonLayer({
@@ -253,5 +292,8 @@
        },
      });
      map.addLayer(geoJsonLayer);
=======
>>>>>>> 165c834d414f2c5f56ad6d259b5f18c26921cc94
}