const creatArcGISs = function creatArcGIS() { // 加载ArcGIS在线地图 viewer.imageryLayers.addImageryProvider( new Cesium.ArcGisMapServerImageryProvider({ url: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer" }) ); }; const creatBaidus = function creatBaidu() { viewer.imageryLayers.addImageryProvider( new Cesium.UrlTemplateImageryProvider({ url: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}", minimumLevel: 3, maximumLevel: 18 }) ); }; const creatgaoimages = function creatimage() { viewer.imageryLayers.addImageryProvider( new Cesium.UrlTemplateImageryProvider({ url: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}", minimumLevel: 3, maximumLevel: 18 }) ); }; const creatgaovectors = function creatvector() { viewer.imageryLayers.addImageryProvider( new Cesium.UrlTemplateImageryProvider({ url: "http://webrd02.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}", minimumLevel: 4, maximumLevel: 18 }) ); }; const creattdimages = function creattdimage() { var tdt_key = "789e558be762ff832392a0393fd8a4f1"; viewer.imageryLayers.addImageryProvider( new Cesium.WebMapTileServiceImageryProvider({ url: "http://t0.tianditu.com/img_w/wmts?tk=" + tdt_key, layer: "img", style: "default", tileMatrixSetID: "w", format: "tiles", maximumLevel: 18 }) ); }; const creattdvectors = function creattdvector() { var tdt_key = "789e558be762ff832392a0393fd8a4f1"; viewer.imageryLayers.addImageryProvider( new Cesium.WebMapTileServiceImageryProvider({ url: "http://t0.tianditu.com/vec_w/wmts?tk=" + tdt_key, layer: "vec", style: "default", tileMatrixSetID: "w", format: "tiles", maximumLevel: 18 }) ); }; const creattdLebals = function creattdLebal() { var tdt_key = "789e558be762ff832392a0393fd8a4f1"; viewer.imageryLayers.addImageryProvider( new Cesium.WebMapTileServiceImageryProvider({ url: "http://t0.tianditu.com/cia_w/wmts?tk=" + tdt_key, layer: "cia", style: "default", tileMatrixSetID: "w", format: "tiles", maximumLevel: 18 }) ); }; const creattenimages = function creattenimage() { viewer.imageryLayers.addImageryProvider( new Cesium.UrlTemplateImageryProvider({ url: "https://p2.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=229", customTags: { sx: function(imageryProvider, x, y, level) { return x >> 4; }, sy: function(imageryProvider, x, y, level) { return ((1 << level) - y) >> 4; } } }) ); }; const creattenvectors = function creattenvector() { viewer.imageryLayers.addImageryProvider( new Cesium.UrlTemplateImageryProvider({ url: "https://rt3.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid=1&version=297", customTags: { sx: function(imageryProvider, x, y, level) { return x >> 4; }, sy: function(imageryProvider, x, y, level) { return ((1 << level) - y) >> 4; } } }) ); }; const creattenblacks = function creattenblack() { viewer.imageryLayers.addImageryProvider( new Cesium.UrlTemplateImageryProvider({ url: "https://rt3.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid=4&scene=0", customTags: { sx: function(imageryProvider, x, y, level) { return x >> 4; }, sy: function(imageryProvider, x, y, level) { return ((1 << level) - y) >> 4; } } }) ); }; const creattenLebals1 = function creattenLebal1() { viewer.imageryLayers.addImageryProvider( new Cesium.UrlTemplateImageryProvider({ url: "https://rt3.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid=3&scene=0", customTags: { sx: function(imageryProvider, x, y, level) { return x >> 4; }, sy: function(imageryProvider, x, y, level) { return ((1 << level) - y) >> 4; } } }) ); }; const creattenLebals2 = function creattenLebal2() { viewer.imageryLayers.addImageryProvider( new Cesium.UrlTemplateImageryProvider({ url: "https://rt3.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid=2&version=297", customTags: { sx: function(imageryProvider, x, y, level) { return x >> 4; }, sy: function(imageryProvider, x, y, level) { return ((1 << level) - y) >> 4; } } }) ); }; const creatLineMaps = function creatLineMap() { viewer.imageryLayers.addImageryProvider( new Cesium.UrlTemplateImageryProvider({ url: "http://data.mars3d.cn/tile/googleImg/{z}/{x}/{y}.jpg" }) ); }; const mapList = data => { let Vuemouunted = null; let bodydiv = null; let Vuedata = null; let Vuemethod = null; let importData = null; switch (data.name) { case "ArcGis地图": Vuemouunted = "\n" + data.interiormethod + "\n" + creatArcGISs.toString(); break; case "百度地图": Vuemouunted = "\n" + data.interiormethod + "\n" + creatBaidus.toString(); break; case "高德影像": Vuemouunted = "\n" + data.interiormethod + "\n" + creatgaoimages.toString(); break; case "高德矢量": Vuemouunted = "\n" + data.interiormethod + "\n" + creatgaovectors.toString(); break; case "天地图影像": Vuemouunted = "\n" + data.interiormethod + "\n" + creattdimages.toString(); break; case "天地图矢量": Vuemouunted = "\n" + data.interiormethod + "\n" + creattdvectors.toString(); break; case "天地图标注": Vuemouunted = "\n" + data.interiormethod + "\n" + creattdLebals.toString(); break; case "腾讯影像": Vuemouunted = "\n" + data.interiormethod + "\n" + creattenimages.toString(); break; case "腾讯矢量": Vuemouunted = "\n" + data.interiormethod + "\n" + creattenvectors.toString(); break; case "腾讯黑色风格": Vuemouunted = "\n" + data.interiormethod + "\n" + creattenblacks.toString(); break; case "腾讯注记1": Vuemouunted = "\n" + data.interiormethod + "\n" + creattenLebals1.toString(); break; case "腾讯注记2": Vuemouunted = "\n" + data.interiormethod + "\n" + creattenLebals2.toString(); break; case "离线瓦片": Vuemouunted = "\n" + data.interiormethod + "\n" + creatLineMaps.toString(); break; } return { bodydiv, Vuedata, importData,Vuemethod, Vuemouunted }; }; export { mapList };