我想要对地图上的图层进行截图,我现在地图上的图层如下图:
我现在截出的图如下:
我使用的webpack,请问一下,这是什么原因呢??
let style = { fillColor: "#ee9900", fillOpacity: 1, strokeColor:"#ee9900", strokeOpacity: 0.4, strokeWidth: 1 }
图层不透明度调为1,,仍然会出现上述问题,请问一下 ,有什么操作会导致上述问题呢?
您的地图截图的功能是怎么实现的,能贴一下代码看一下吗?我用的是官网的http://iclient.supermap.io/examples/classic/editor.html#others_printscreen这个范例,把vectorlayer加进去之后设置透明度也没有出现您上面出现的只有边框没有填充颜色的情况。
方便的话私信一下您的联系方式,最好是QQ号,然后这个问题目前根据代码考虑有可能是这一步的时候出现的问题,feature1.style = feature.style,可以考虑一下通过new 一个style存储feature.style然后再赋给feature1。如果方便的话加一下QQ的话更好去沟通关于这个问题的一些相关内容。
for(let j=0;j<features.length;j++){ let feature = features[j]; let feature1 = new SuperMap.Feature.Vector(); feature1.geometry = feature.geometry.clone(); feature1.style = feature.style; features1.push(feature1); }