123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227 |
- 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 };
|