antvis / L7VP

L7VP is an geospatial intelligent visual analysis and application development tools.
https://li.antv.antgroup.com
Apache License 2.0
201 stars 22 forks source link

加载离线mapbox底图的时候,使用导出图片功能,图片上不能显示地图 #73

Closed evefff closed 1 year ago

evefff commented 1 year ago

请问加载离线mapbox底图的时候,使用导出图片功能,图片上不能显示地图,只能显示添加的图层是什么原因呢

lvisei commented 1 year ago

我这边是 OK。复现一下步骤呢

image
lvisei commented 1 year ago

如果是自己搭建的工具的话,需要在 config 里面添加 preserveDrawingBuffer,才可以导出底图 @evefff

spec: {
    map: {
      basemap: 'Gaode',
      config: {
       // for Gaode
        WebGLParams: {
          preserveDrawingBuffer: true,
        },
        // for mapbox
        preserveDrawingBuffer: true,
      },
    },
}
evefff commented 1 year ago

感谢大佬! 确实是这个问题,写的时候没有注意到gaode和mapbox,配置preserveDrawingBuffer: true,的区别