Good Day
I have a situation where I need to hide several features in the Stream Layer, but I can't set a definitionExpression, so I'm setting the layer's featureEffect:
const featureFilter = new FeatureFilter({
where: featureQuery
});
layer.layer.featureEffect = new FeatureEffect({
filter: featureFilter,
excludedEffect: "opacity(0%)"
});
This works, and the features “disappear”. The issue I have, they still respond to the “hitTest”, so if I have a sketchWidget active and do something like:
this.sketchWidgetPointerUpEvent = this._view.on("pointer-up", (event) => {
this._view.hitTest(event).then(async (response) => {
if (response.results.length && this.lassoSet) {
this.lassoSet = false;
this._view.graphics.removeAll();
const geometries = response.results.map((graphic, index: number) => {
if (graphic.graphic.geometry) {
return graphic.graphic.geometry
}
});
const queryGeometry = await geometryEngineAsync.union(geometries);
this.selectFeatures(queryGeometry);
}
});
});
My question is, how do I stop the excluded features from being selectable? Is there a better way to query the features, and I don't think using the layerView.queryFeatures would work because that would only consider what's in the active view, not what is outside the view? Is there a way to look at the effect of the feature? If I do use layerView.queryFeatures, could I force it to look at the entire map instead of the view (I don't think so).
Thanks for any help provided.
Thanks