|  | @@ -5,10 +5,11 @@ import {formatStringByTemplate} from "@/utils/string";
 | 
	
		
			
				|  |  |  import bus from "@/utils/bus";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export let scene: Scene;
 | 
	
		
			
				|  |  | +// 加载状态
 | 
	
		
			
				|  |  | +export let loadedStatus = false;
 | 
	
		
			
				|  |  |  export const imageMap = new Map()
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  function loadImage(images: any[]) {
 | 
	
		
			
				|  |  | -  debugger
 | 
	
		
			
				|  |  |    images.forEach((item: any) => {
 | 
	
		
			
				|  |  |      if (!imageMap.has(item.name)) {
 | 
	
		
			
				|  |  |        imageMap.set(item.name, item.src);
 | 
	
	
		
			
				|  | @@ -30,6 +31,7 @@ export function init(config: any) {
 | 
	
		
			
				|  |  |    });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    scene.on('loaded', () => {
 | 
	
		
			
				|  |  | +    loadedStatus = true
 | 
	
		
			
				|  |  |      loadBaseLayer()
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      // 加载图片
 | 
	
	
		
			
				|  | @@ -49,7 +51,8 @@ export function init(config: any) {
 | 
	
		
			
				|  |  |   * 加载底图
 | 
	
		
			
				|  |  |   */
 | 
	
		
			
				|  |  |  function loadBaseLayer() {
 | 
	
		
			
				|  |  | -  const url1 = 'https://t0.tianditu.gov.cn/img_w/wmts?tk=b72aa81ac2b3cae941d1eb213499e15e&';
 | 
	
		
			
				|  |  | +  // 底图服务
 | 
	
		
			
				|  |  | +  const url1 = 'https://t0.tianditu.gov.cn/img_w/wmts?tk=a4eab5a1b0d94268669e192b8799f626&';
 | 
	
		
			
				|  |  |    const layer1 = new RasterLayer().source(url1, {
 | 
	
		
			
				|  |  |      parser: {
 | 
	
		
			
				|  |  |        type: 'rasterTile',
 | 
	
	
		
			
				|  | @@ -63,33 +66,16 @@ function loadBaseLayer() {
 | 
	
		
			
				|  |  |    });
 | 
	
		
			
				|  |  |    scene.addLayer(layer1);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -  // // 天地图卫片地图
 | 
	
		
			
				|  |  | -  // scene.on('loaded', () => {
 | 
	
		
			
				|  |  | -  //   // 底图服务
 | 
	
		
			
				|  |  | -  //   const baseLayer = new RasterLayer({zIndex: 1})
 | 
	
		
			
				|  |  | -  //     .source(
 | 
	
		
			
				|  |  | -  //       `https://t1.tianditu.gov.cn/DataServer?T=vec_w&X={x}&Y={y}&L={z}&tk=${this.token}`,
 | 
	
		
			
				|  |  | -  //       {
 | 
	
		
			
				|  |  | -  //         parser: {
 | 
	
		
			
				|  |  | -  //           type: 'rasterTile',
 | 
	
		
			
				|  |  | -  //           tileSize: 256,
 | 
	
		
			
				|  |  | -  //         }
 | 
	
		
			
				|  |  | -  //       }
 | 
	
		
			
				|  |  | -  //     );
 | 
	
		
			
				|  |  | -  //   // 注记服务
 | 
	
		
			
				|  |  | -  //   const annotionLayer = new RasterLayer({zIndex: 2})
 | 
	
		
			
				|  |  | -  //     .source(
 | 
	
		
			
				|  |  | -  //       `https://t1.tianditu.gov.cn/DataServer?T=cva_w&X={x}&Y={y}&L={z}&tk=${this.token}`,
 | 
	
		
			
				|  |  | -  //       {
 | 
	
		
			
				|  |  | -  //         parser: {
 | 
	
		
			
				|  |  | -  //           type: 'rasterTile',
 | 
	
		
			
				|  |  | -  //           tileSize: 256,
 | 
	
		
			
				|  |  | -  //         }
 | 
	
		
			
				|  |  | -  //       }
 | 
	
		
			
				|  |  | -  //     );
 | 
	
		
			
				|  |  | -  //   scene.addLayer(baseLayer);
 | 
	
		
			
				|  |  | -  //   scene.addLayer(annotionLayer);
 | 
	
		
			
				|  |  | -  // });
 | 
	
		
			
				|  |  | +  // const baseLayer = new RasterLayer().source(
 | 
	
		
			
				|  |  | +  //   `https://t1.tianditu.gov.cn/DataServer?T=vec_w&X={x}&Y={y}&L={z}&tk=a4eab5a1b0d94268669e192b8799f626}`,
 | 
	
		
			
				|  |  | +  //   {
 | 
	
		
			
				|  |  | +  //     parser: {
 | 
	
		
			
				|  |  | +  //       type: 'rasterTile',
 | 
	
		
			
				|  |  | +  //       tileSize: 256,
 | 
	
		
			
				|  |  | +  //     }
 | 
	
		
			
				|  |  | +  //   }
 | 
	
		
			
				|  |  | +  // );
 | 
	
		
			
				|  |  | +  // scene.addLayer(baseLayer);
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /**
 |