Operational Layer(identify Widget)

1782
4
05-05-2016 08:19 AM
soniamonga
New Contributor II

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

Tags (1)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

Sonia,

  You can borrow code from my eSearch to do this.

0 Kudos
soniamonga
New Contributor II

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!

0 Kudos
soniamonga
New Contributor II

Appreciate your prompt reply Robert! I will give it a try.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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.

0 Kudos