cesium笔记 加载arcgis server服务

                viewer.imageryLayers.remove(this.addArcgisLayer);//移除上一次加载的图层
                let res = this.$refs.tree.getCheckedNodes(true);//只获取所有子节点
                let arr = []
                res.forEach((item) => {
                    arr.push(item.id)//树的子节点为图层id
                })
                let url = "http://00.00.00.00:0000/arcgis/rest/services/FLH/FLHMapService/MapServer";
                if (arr.length !== 0) {
                    let ArcgisLayer = new Cesium.ArcGisMapServerImageryProvider({
                        url: url,
                        layers: arr,
                        /*  parameters: {
                              service: 'WMS',
                              format: 'image/png',
                              transparent: true
                          }*/
                    });
                    this.addArcgisLayer = viewer.imageryLayers.addImageryProvider(ArcgisLayer);
                    this.addArcgisLayer.alpha = 0.5;//设置图层透明度0.5
                }

你可能感兴趣的:(cesium,笔记,arcgis)