const getMaptiles = function getMaptile() { viewer.imageryLayers.addImageryProvider( new Cesium.SingleTileImageryProvider({ url: "https://data.mars3d.cn/file/img/world/blue.jpg" }) ); }; const getMaptilereachs = function getMaptilereach() { var rectangle = Cesium.Rectangle.fromDegrees( 117.259691, 31.834432, 117.267778, 31.84387 ); viewer.imageryLayers.addImageryProvider( new Cesium.SingleTileImageryProvider({ url: "https://data.mars3d.cn/file/img/zkd-dq.png", rectangle: rectangle }) ); viewer.camera.flyTo({ destination: Cesium.Cartesian3.fromDegrees(117.259691, 31.834432, 500), orientation: { heading: Cesium.Math.toRadians(0.0), pitch: Cesium.Math.toRadians(-25.0), roll: 0.0 } }); }; const tilewms = function tilewm() { viewer.imageryLayers.addImageryProvider( new Cesium.WebMapServiceImageryProvider({ url: "https://nationalmap.gov.au/proxy/http://geoserver.nationalmap.nicta.com.au/geotopo_250k/ows", layers: "Hydrography:bores", parameters: { transparent: true, format: "image/png" } }) ); }; const tileWMTS = function tilewmt() { viewer.imageryLayers.addImageryProvider( new Cesium.WebMapTileServiceImageryProvider({ url: "https://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefOnly/MapServer/WMTS", layer: "USGSShadedReliefOnly", style: "default", format: "image/jpeg", tileMatrixSetID: "default028mm", maximumLevel: 19, credit: "U. S. Geological Survey" }) ); }; const ArcGISServers = function ArcGISServer() { viewer.imageryLayers.addImageryProvider( new Cesium.ArcGisMapServerImageryProvider({ url: "http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer" }) ); }; const imageTools = ` formatTooltip(val) { return val / 100; }, imageBrightne() { this.$nextTick(() => { viewer.scene.imageryLayers.get(0).brightness = this.Brightnessnum / 100; }); }, imageContras() { this.$nextTick(() => { viewer.scene.imageryLayers.get(0).contrast = this.Contrastsnum / 100; }); }, imageColor() { this.$nextTick(() => { viewer.scene.imageryLayers.get(0).hue = this.Coloursum / 100; }); }, imageLevel() { this.$nextTick(() => { viewer.scene.imageryLayers.get(0).saturation = this.Levelsum / 100; }); }, imageGamma() { this.$nextTick(() => { viewer.scene.imageryLayers.get(0).gamma = this.Gammasum / 100; }); }, imageOpacity() { this.$nextTick(() => { viewer.scene.imageryLayers.get(0).alpha = this.Opacitysum / 100; }); }`; const tileList = data => { let Vuemouunted = data.Vuemouunted || null; let bodydiv = data.bodydiv || null; let Vuedata = data.Vuedata || null; let Vuemethod = data.outmethod || null; let importData = data.importData || null; let refdata = data.ref || null; switch (data.name) { case "image本地单张图片": Vuemouunted = "\n" + data.interiormethod + "\n" + getMaptiles.toString(); break; case "image本地单张图片(区域)": Vuemouunted = "\n" + data.interiormethod + "\n" + getMaptilereachs.toString(); break; case "OGC WMS服务": Vuemouunted = "\n" + data.interiormethod + "\n" + tilewms.toString(); break; case "OGC WMST服务": Vuemouunted = "\n" + data.interiormethod + "\n" + tileWMTS.toString(); break; case "ArcGIS Server服务": Vuemouunted = "\n" + data.interiormethod + "\n" + ArcGISServers.toString(); break; case "色彩级透明度属性": Vuemethod = imageTools; break; } return { bodydiv, Vuedata, importData, Vuemethod, Vuemouunted, refdata }; }; export { tileList };