Select to view content in your preferred language

Create Breadcrumb layer in 4x

07-26-2022 09:33 AM
New Contributor III

I'm trying to re-create a 'breadcrumb' layer in a JavaScript 4x map app. Basically what it needs to do is, whenever the user moves a timeslider, the features that lie before selected time should re-render into small arrows, while those with time values that match the slider's would keep the original symbology.

In JS API 3x this can be done with TemporalRenders. However it is not available in 4x.

Looks like FeatureEffect can be used to re-render features based on a time filter, but it does not seem to have an option to apply different symbols. Can someone please suggest a way forward?


0 Kudos
1 Reply
Esri Regular Contributor

Hi there, 

I created a very simple test app to show how to change the symbols of old features that TimeSlider widget already played. In the app, I am watching the TimeSlider.timeExtent property and set the timeExtent directly on the layer object, then createRenderer function is called. In this function, we set a unique-value renderer with valueExpression and use the expression in the visual variables.

We have a guide doc in our SDK to talks about how to visualize data based on time.  You may find that info useful as I used this guide topic as a starting point to symbolize data differently based on time.

Hope this helps,


0 Kudos