| | |
| | | } |
| | | } |
| | | |
| | | function mask_selection(userid){ |
| | | |
| | | function mask_selection(regionCode){ |
| | | if(regionCode == 0){ |
| | | return |
| | | } |
| | | //geojson 各行政区边界线 |
| | | if(userid != null || userid != undefined){ |
| | | geoJsonLayer = new mars3d.layer.GeoJsonLayer({ |
| | | url: "./data/"+userid+".geojson", |
| | | url: "./data/"+regionCode+".geojson", |
| | | mask: true, //标识为遮罩层【重点参数】 |
| | | symbol: { |
| | | styleOptions: { |
| | | fill: true, |
| | | color: "rgb(2,26,79)", |
| | | opacity: 0.9, |
| | | outline: true, |
| | | outlineColor: "#39E09B", |
| | | outlineWidth: 8, |
| | | outlineOpacity: 0.8, |
| | | outlineWidth: 3, |
| | | outlineOpacity: 0.5, |
| | | arcType: Cesium.ArcType.GEODESIC, |
| | | clampToGround: true, |
| | | }, |
| | | }, |
| | | }); |
| | | map.addLayer(geoJsonLayer); |
| | | }else{ |
| | | return |
| | | } |
| | | } |
| | | |