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()