Feature widget - Query graphics from multiple layerViews
This sample is similar to the Feature widget in a side panel sample with the exception that this sample demonstrates working with multiple layers of different types. This sample uses three separate layers: two imagery layers and one feature layer. This sample works with the Popup's fetchFeatures method. This takes a given screen location and returns features from multiple LayerViews. It displays information based on the layer's associated PopupTemplate.
First, listen for the view's click event and pass this into the fetchFeatures method.
Next, iterate through all of the returned features to access their associated LayerView and graphics.
Then, loop through the returned graphics from the resulting LayerViews and pass this graphic into the Feature widget's graphic property.