ArcGIS API for JavaScript 4.22
I have a web app that apply Feature Effect and Labeling on a Feature Layer.
Firts I apply a Feature Effect:
layerView.featureEffect = null;
let featureFilter = new FeatureFilter({
where: "Type = '" + document.getElementById("filterText").value + "'"
});
layerView.featureEffect = new FeatureEffect({
filter: featureFilter,
excludedEffect: "grayscale(100%) opacity(30%)",
excludedLabelsVisible: false
});
Then I clear the Feature Effect:
layerView.featureEffect = null;
I can only see labels on features filtered by the previous Feature Effect.
Can I see labels on all features after clear a previous FeatureEffect?
Solved! Go to Solution.
Hi @LuisAntonioRodriguezGonzalez - this appears to be a bug in 4.22. We'll take a look and get this fixed in an upcoming release! Thanks for letting us know.
Hi @LuisAntonioRodriguezGonzalez - this appears to be a bug in 4.22. We'll take a look and get this fixed in an upcoming release! Thanks for letting us know.
Hi @LuisAntonioRodriguezGonzalez - this has been fixed and will be available in the 4.23 release. Thanks!
Hi! I am using typescript and this assignation is not possible
featureLayerView.featureEffect = null
Error: Type 'null' is not assignable to type 'FeatureEffect'.
I've also tried, but not working:
featureLayerView.featureEffect.destroy()
Hi!, I´m also using typescript and the bug persists.
Null asignation is not posible. I tried asign to an empty FeatureEffect class but dont works.
featureLayerView.featureEffect = null
featureLayerView.featureEffect.destroy()
featureLayerView.featureEffect = new FeatureEffect()
Thank you
Hi!
It was my fault. The problem was in the "excludedLabelsVisible" property, it has to be true for enable labels of excluded entities.
this.pointsLayer.featureEffect = new FeatureEffect({
filter: new FeatureFilter({
objectIds: [
hit.graphic.attributes[
constants.arcgis.layers.backhauls.fields.objectid
]
]
}),
excludedEffect: 'opacity(90%)',
includedEffect: 'bloom(0.6 0.1pt 0) contrast(130%)',
excludedLabelsVisible: true
})
@LuisAntonioRodriguezGonzalez In your example, the value is set to false.
Thank you.