I have a page (ArcGIS API for JavaScript 4.18) that creates and displays a client side FeatureLayer, which shows dynamic data that is edited every 30 seconds or so with applyEdits. Everything works great with that.
Is there a way to create a "view" of that FeatureLayer, that shows up as a second layer in the TOC? The view layer needs to have all the same data as the original FL, but I want to apply a different definition query.
An example of this is showing current transit bus locations, where the original FL contains all of the bus locations, but only shows features that have been updated within the last hour. I need a view layer that uses the original FLs data, but lets me set a definition query to only show features that are older than an hour. I'm trying to not have to maintain edits on two Feature Layers.
Is this possible?