setlayer() {
            let CQL_FILTER = ``;
            if (this.boundaryLayer == null) {
                this.boundaryLayer = L.layerGroup();
                this.boundaryLayer.addTo(this.map)
            }
            this.boundaryLayer.clearLayers();
            let layer = L.tileLayer.wms(`${this.$baseIP}geoserver/guizhou/wms`, {
                exceptions: "application/vnd.ogc.se_inimage",
                format: 'image/png',
                layers: 'guizhou:Border_Shi',
                styles: "guizhou:FFF",
                transparent: true,
                REQUEST: 'GetMap',
                SERVICE: 'WMS',
                tileSize: 256,
                attribution: "Weather data © 2012 IEM Nexrad",
                srs: "EPSG:4326",
                CQL_FILTER: CQL_FILTER || '',
                pane: 'ystbPane'
            })
            layer.addTo(this.boundaryLayer);
        },

 

posted on 2025-03-04 15:43  shihongbo  阅读(18)  评论(0)    收藏  举报