| | |
| | | let img_layer = window.Viewer.imageryLayers.addImageryProvider(layer); |
| | | this.layerList.push({ id: res.id, layerData: img_layer, type: "wmts" }); |
| | | }, |
| | | addGeoServerMmsLayers(layer, url) { |
| | | var that = this |
| | | var getFeatureInfoFormat = new SmartEarth.Cesium.GetFeatureInfoFormat("html", null, function (html) { |
| | | that.getFeatureInfo(html) |
| | | }); |
| | | let wmslayer = new SmartEarth.Cesium.WebMapServiceImageryProvider({ |
| | | url: url, |
| | | layers: layer.toString(), |
| | | getFeatureInfoParameters: { info_format: 'text/html' }, |
| | | enablePickFeatures: true, |
| | | getFeatureInfoFormats: [getFeatureInfoFormat], |
| | | parameters: { |
| | | transparent: true, |
| | | format: "image/png", |
| | | srs: "EPSG:104903", |
| | | styles: "", |
| | | }, |
| | | tileWidth: 512, |
| | | tileHeight: 512, |
| | | }); |
| | | wmslayer.name = `Wms_Layer_geo`; |
| | | let img_layer = window.Viewer.imageryLayers.addImageryProvider(wmslayer); |
| | | this.layerList.push({ id: 1001011, layerData: img_layer, type: "wmts" }); |
| | | }, |
| | | |
| | | |
| | | getFeatureInfo(html) { |
| | | store.state.details.showDetails = false; |
| | | var start = html.indexOf("<caption class=\"featureInfo\">") + "<caption class=\"featureInfo\">".length; |