首页 / 浏览问题 / WebGIS / 问题详情
vue dialog弹出地图时显示不全
1EXP 2021年11月22日

dialog弹窗使用的都是相同组件。当我切换到普通表单弹窗后再次回到地图弹窗,地图显示残缺。

// 地图底图加载start
      this.map = L.map(this.containerId, {
        center: [32.28119, 119.11477],
        minZoom: 14.5,
        zoom: 12,
        crs: L.CRS.EPSG3857
      })
      this.map.on('mousemove', (e) => {
        this.currentPosition = e.latlng.lat + ',' + e.latlng.lng
      })
      const defaultIcon = L.icon({
        iconUrl: icon,
        shadowUrl: iconShadow
      })
      L.Marker.prototype.options.icon = defaultIcon
      // 仪征市影像-单纯为了扩大地图的拖拽空间,最好不要去掉
      L.supermap.tiledMapLayer(this.mbtilesUrl).addTo(this.map)
      // 化工园影像
      L.supermap.tiledMapLayer(this.url).addTo(this.map)
      this.map._onResize()

1个回答

您好,加载不全的时候看下控制台报什么错呢
1,000EXP 2021年11月22日
...