Commit 99e1be05d55eedc9111ef998cce03ae6a07d096c

Authored by ww
1 parent 1a5d33bf

fix: 修复设备分布地图保存缩略图时为空白地图

... ... @@ -56,7 +56,10 @@ const initMap = (newData: any) => {
56 56 pitch: pitch.value, // 地图俯仰角度,有效范围 0 度- 83 度
57 57 skyColor: skyColor.value,
58 58 viewMode: viewMode.value, // 地图模式
59   - willReadFrequently: true
  59 + willReadFrequently: true,
  60 + WebGLParams: {
  61 + preserveDrawingBuffer: true,
  62 + }
60 63 })
61 64 dataHandle(props.chartConfig.option.dataset)
62 65 let satellite = new AMap.TileLayer.Satellite()
... ... @@ -68,7 +71,7 @@ const initMap = (newData: any) => {
68 71 mapIns.setMapStyle(`amap://styles/${amapStyleKeyCustom.value !== '' ? amapStyleKeyCustom.value : amapStyleKey.value}`)
69 72 }
70 73 })
71   - .catch(e => {})
  74 + .catch(e => { })
72 75 }
73 76
74 77 const dataHandle = (newData: any) => {
... ...
... ... @@ -74,7 +74,10 @@ const initMap = (newData: any) => {
74 74 pitch: pitch.value, // 地图俯仰角度,有效范围 0 度- 83 度
75 75 skyColor: skyColor.value,
76 76 viewMode: viewMode.value, // 地图模式
77   - willReadFrequently: true
  77 + willReadFrequently: true,
  78 + WebGLParams: {
  79 + preserveDrawingBuffer: true,
  80 + }
78 81 })
79 82 dataHandle(props.chartConfig.option.dataset) //处理地图标点
80 83 let satellite = new AMap.TileLayer.Satellite()
... ...