wujingjing
2025-01-17 7fbce1ecd95b4e12ceda0a5b874ec8f3951625f7
src/model/map/OLMap.ts
@@ -258,8 +258,31 @@
   }
   private addBasicControl() {
      this.map.addControl(new ZoomSlider());
      // this.map.addControl(new ZoomSlider());
      // this.map.addControl(new FullScreen());
      const container = this.map.getViewport();
      if (!container) return;
      const olZoom = container.querySelector('.ol-zoom') as HTMLElement;
      if (!olZoom) return;
      olZoom.style.display = 'none';
   }
   /**
    * 放大地图
    */
   zoomIn() {
      const view = this.map.getView();
      const zoom = view.getZoom();
      view.setZoom(zoom + 1);
   }
   /**
    * 缩小地图
    */
   zoomOut() {
      const view = this.map.getView();
      const zoom = view.getZoom();
      view.setZoom(zoom - 1);
   }
   getWMTS = () => {