[Javascript API] LayerSwipe widget working with different timestamps of the same layer

2599
1
04-27-2015 05:50 AM
StefanoTassara
New Contributor

Hi,

I'd like to give the users of my application the ability to easily compare two different instants of the same time-enabled layer, for example with the LayerSwipe widget.

The problem is that this widget only takes an array of layers as input, and the timestamp AFAIK can't be set at layer level, but only at map level, so I don't see a way to compare two different instants of the same layer...

Any idea/suggestion/workaround for this?

Thanks!

Tags (2)
0 Kudos
1 Reply
TomSellsted
MVP Regular Contributor

Stefano,

Perhaps you could create two featurelayers and set the definition expression for each one for the time ranges for comparison?

FeatureLayer | API Reference | ArcGIS API for JavaScript

Regards,

Tom

0 Kudos