Hi,
I have a set layers loaded in the scene and it depends of the selected layer, I would like to be able to set the visible property to false or true of each geometry/feature, is it possible?
All information that I found is related to the layer, but at this point the layer contains geometries/features and my goal is to interact with these and leave the layer at the top of visibility to true.
I used the following lines
function setGeometriesVisibility(layer, ids) {
//ids => contains an array of keys id
let query = layer.createQuery();
layer.queryFeatures(query).then(function (response) {
response.features.forEach((f) => {
//GisId => a custom property that defines an id
f.visible = ids.indexOf(f.attributes.GisId) > -1 ? true : false;
layer.applyEdits({ updateFeatures: [f] }).then(function (results) {
//Do nothing
}).catch(error => console.log(error));
});
});
}
I had an error that describes "Layer does not support updating features."
is there any functionality that allows to set the visibility of the geometry/feature?
Thanks in advance for any kind of help