Export Selection to redlining
Opened this issue · 2 comments
cazitouni commented
manisandro commented
Yes why not, potentially one could add a "Add to redlining layer" button where one can pick an existing layer or a create a new one.
cazitouni commented
Hello @manisandro,
I made a custom exporter (using js/IdentifyExtensions.js) for our own needs regarding this issue.
export const customExporters = [
{
id: "exportEdition",
title: "Dessin",
export: function(features) {
Object.keys(features).forEach(key => {
let data = features[key];
const layer = {
id: "dessin",
role: LayerRole.USERLAYER,
title:"Dessin",
};
const layerFeatures = [];
if (Array.isArray(data)) {
data.forEach(item => {
if (item.geometry) {
item.crs = item.crs;
item.styleName = 'default';
item.styleOptions = {
fillColor: [242, 151, 84, 0.30],
strokeColor: [242, 151, 84, 0.75],
strokeWidth: 2,
strokeDash: []
};
layerFeatures.push(item);
}
});
}
window.qwc2.addLayerFeatures(layer, layerFeatures, false)
});
}
}
];
Would it be interesting for you if I modified it a little to integrate it into the default exporters?
Regards, Clément.