Feature Effect and Labeling issue

764
3
Jump to solution
12-31-2021 04:31 AM
LuisAntonioRodriguezGonzalez
New Contributor II

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
});

 

FeatureEffect.png

Then I clear the Feature Effect:

 

layerView.featureEffect = null;

 

I can only see labels on features filtered by the previous Feature Effect.

ClearFeatureEffect.png

Can I see labels on all features after clear a previous FeatureEffect?

0 Kudos
1 Solution

Accepted Solutions
AnneFitz
Esri Regular Contributor

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. 

View solution in original post

0 Kudos
3 Replies
AnneFitz
Esri Regular Contributor

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. 

0 Kudos
AnneFitz
Esri Regular Contributor

Hi @LuisAntonioRodriguezGonzalez - this has been fixed and will be available in the 4.23 release. Thanks!

0 Kudos
LuisSolaRuiz
New Contributor II

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()

 

0 Kudos