I am using Robert's identify widget and was wondering if I could store the features in graphics layers as
operational layer with featureCollection? If so, can you please share the code?
Thanks,
Sonia
Sonia,
You can borrow code from my eSearch to do this.
Robert,
I do see the results added as an operational layer. However the legend doesn’t display just the selected features, but the complete legend. If I compare it with your esearch widget, I see the Search Results: operational layer display just the selected symbology. Could you please take a look at the code and what is possible error? Would really appreciate your help.
Thank you so much!
Appreciate your prompt reply Robert! I will give it a try.
Sonia,
I don't see a bit of code in what you provided here that looks like you are doing anything with a FeatureCollection like you originally asked about. I had suggested that you look at the eSearch and borrow code from there to use to add a featurelayer that uses a FeatureCollection. The function in the eSearch that creates the FeatureLayer using a FeatureCollection is the _createSearchResultLayer method in the eSearch.