ArcGIS API for JavaScript 4.22
I have a web app that shows a WebMap with a Stream Layer. This app allows you apply Feature Effect, FeatureFilter or a Definition Expresion on an Stream Layer. Optionally you can set labels on the Stream Layer.
"esri/layers/support/FeatureEffect",
"esri/layers/support/FeatureFilter"
I have found these issues:
// Apply FeatureEffect
let featureFilter = new FeatureFilter({
where: "OriginID = '" + document.getElementById("streamFilterText").value + "'"
});
if (tipoFiltro === "effect") {
streamLayerView.featureEffect = new FeatureEffect({
filter: featureFilter,
excludedEffect: "grayscale(100%) opacity(30%)"
});
}
let featureFilter = new FeatureFilter({
where: "OriginID = '" + document.getElementById("streamFilterText").value + "'"
});
. . .
else if (tipoFiltro === "filter")
streamLayerView.filter = featureFilter;
I attach the source code.
These are the guidelines to use de web app:
Solved! Go to Solution.
Could be related to this issue found here.
Could be related to this issue found here.
One thing notice from the sample code, in line 233 streamLayerView.definitionExpression = null;
streamLayerView does not have definitionExpression property. StreamLayerView | API Reference | ArcGIS API for JavaScript 4.22 | ArcGIS Developer
Thank you. StreamLayer has definitionExpression property: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#definitio...
I've replaced
streamLayerView.definitionExpression = null;
by
streamLayer.definitionExpression = null;
But definitionExpression does not work with an StreamLayer.