Process canvas / svg screenshots based on direct children of the layer, rather than any content.
Eventually, when we process html layers, those could contain svg elements, which should not be processed here.
MODIFY
src/map.js
src/map.js
@@ -1651,13 +1651,13 @@ var map = function (arg) {
if (opacity <= 0) {
return;
}
- $('canvas', layer.node()).each(function () {
+ layer.node().children('canvas').each(function () {
if (layer.renderer().api() === 'vgl') {
layer.renderer()._renderFrame();
}
drawLayerImageToContext(context, opacity, $(this), $(this)[0]);
});
- $('svg', layer.node()).each(function () {
+ layer.node().children('svg').each(function () {
var elem = $(this);
defer = defer.then(function () {
return util.svgToImage(elem).done(function (img) {

Process canvas / svg screenshots based on direct children of the layer, rather than any content.

Eventually, when we process html layers, those could contain svg elements, which should not be processed here.