I'm using a SketchViewModel to draw a polygon around features. The resulting geometry is then used in a query to query the FeatureLayerView. More than 1 feature can be returned in the query results. Currently, I add highlights to all of the resulting graphics. featureLayerView.queryFeatures(query).then(function (results) { graphics = results.features; if (graphics.length > 0) { highlight = featureLayerView.highlight(graphics); }); I now need additional functionality to remove previously selected graphics. Scenario, first sketch I highlight 5 graphics. Second sketch I draw a polygon around 3 of the 5 previously highlighted graphics. I'd like the 3 previously highlights removed. How would I go about doing that? My other thought is instead of using a highlight, I would use a client side feature layer in place of a highlight. That way I create the features and on subsequent selections, I can query the feature layer and remove the feature if it is pre-existing. Thanks.
... View more