Why don't my featureLayer labels display when using timeSlider widget (Javascript API for ArcGIS 4.14)

117
5
03-29-2020 06:19 PM
Highlighted
New Contributor

You only see all the labels when the slider has gone through the full time extent; at initialization there is nothing, they then start rendering as the slider plays.

Anyone know what the issue is?

See my codepen here: https://codepen.io/cvricella2/pen/eYNxdQg

Thanks!

Tags (1)
Reply
0 Kudos
5 Replies
Highlighted
Esri 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. 

I added your information to our issue system. 

-Undral

Highlighted
New Contributor

Okay could you offer an alternative solution?

I am thinking maybe adding another layer with no fill and controlling the labels there?

Also wondering if I perhaps could somehow use layer filtering like with this example: https://developers.arcgis.com/javascript/latest/sample-code/timeslider-filter/index.html

Carl Vricella

GIS Analyst – System Mapping

Mobile: 631-559-9633

Carl.vricella@pseg.com<mailto:Carl.vricella@pseg.com>

<http://www.psegliny.com>

<http://www.facebook.com/psegli> <http://www.twitter.com/psegli> <http://www.youtube.com/user/PSEGLI> <http://www.flickr.com/photos/psegli>

PSEGSC

Reply
0 Kudos
Highlighted
Esri Contributor

Hi there, 

You are absolutely on the right track for the workaround. I would do exactly what you suggested. I am thinking maybe adding another layer with no fill and controlling the labels there?

Highlighted
Esri Contributor

As for your second comment, do you mean to filter the layers? As for the layer, you can definitely use the filter and effect.  It won't work for the labeling because the labeling optimization happens before filtering. 

Please let me know if you need more info. 

Hope this makes sense,

-Undral

Highlighted
New Contributor

Ah I see, thank a lot for your help

Reply
0 Kudos