| | |
| | | } |
| | | } |
| | | |
| | | function mask_selection(userid){ |
| | | |
| | | //geojson 各行政区边界线 |
| | | if(userid != null || userid != undefined){ |
| | | geoJsonLayer = new mars3d.layer.GeoJsonLayer({ |
| | | url: "./data/"+userid+".geojson", |
| | | mask: true, //标识为遮罩层【重点参数】 |
| | | symbol: { |
| | | styleOptions: { |
| | | fill: true, |
| | | color: "rgb(2,26,79)", |
| | | opacity: 0.9, |
| | | outline: true, |
| | | outlineColor: "#39E09B", |
| | | outlineWidth: 8, |
| | | outlineOpacity: 0.8, |
| | | arcType: Cesium.ArcType.GEODESIC, |
| | | clampToGround: true, |
| | | }, |
| | | }, |
| | | }); |
| | | map.addLayer(geoJsonLayer); |
| | | }else{ |
| | | return |
| | | } |
| | | } |
| | | |
| | |
| | | //有父级 |
| | | request = $.extend(request, haoutil.system.getRequest(window.top)); |
| | | } |
| | | debugger; |
| | | // debugger; |
| | | try { |
| | | var jwtstr = request.JWT; |
| | | var strs_ = jwtstr.split('.'); |
| | |
| | | window.top.location = mars3d.global_variables.un_authorization_url; |
| | | } |
| | | |
| | | mars3d.global_variables.userid = request?.userid || 2; |
| | | // mars3d.global_variables.userid = request?.userid || 2; |
| | | |
| | | var configfile = "config/config.json"; //默认地址 |
| | | if (request.config) { |
| | |
| | | |
| | | initLayersByUserid(); |
| | | |
| | | mask_selection(mars3d.global_variables.userid) |
| | | |
| | | //如果有xyz传参,进行定位 |
| | | if (haoutil.isutil.isNotNull(request.x) && haoutil.isutil.isNotNull(request.y)) { |
| | | map.setCameraView(request, { duration: 0, isWgs84: true }); |