LabelClass not working when Layer is filtered

3206
3
04-10-2020 04:14 AM
AldwinGregorio
New Contributor III

Hi, 
I'm working with 4.14 version of JavaScript API, but apparently, LabelClass is not working as expected. I have a widget that filters out features from a layer based on its status. In the illustration, I have overlapping points. Filtering works. However, labels for filtered features are not showing. 

This is how I filter: 

This is my labelClass: 

This is how I set the labelingInfo:

This is the result:

I hope someone can help me with this. Thank you. 

0 Kudos
3 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

At this time, it is an expected behavior. 4.x labeling engine checks if labels are on exact same spots and keeps one for performance reasons. This behavior is on our radar and we will be enhancing the labels engine to count for scenarios like this one. 

You could add an another layer with no fill and controlling the labels there.

-Undral

AldwinGregorio
New Contributor III

Hi Undral, with another layer, you mean a duplicate of my geojsonLayer with filter expression? Or a graphicsLayer? It will show in my layerlist though. 

0 Kudos
UndralBatsukh
Esri Regular Contributor

Hi there,

Can you please test your app with JS API version 4.18? Is it working as expected?

Thanks,

-Undral

0 Kudos