Add Stream Layer as Source in Search Widget

413
1
Jump to solution
08-04-2022 01:02 AM
ElviraForslund
New Contributor II

I have trouble getting the Search Widget to work with a Stream Layer as a Source. I have followed this Search widget with multiple sources | Sample Code | ArcGIS API for JavaScript 4.24 | ArcGIS Develope... sample code and get the widget to work with a Feature Layer, but not with the Stream Layer.

Does the Search Widget support Stream Layers as a source? Or is there something wrong with the Fields in my  Stream Layer? I can add that I get no errors when I run the code, the Search function just don't find anything from my Stream Layer. 

I will paste the current code where the Feature Layer as a source work but not the Stream Layer. 

Thank you in advance for any help. 

 

Code: (removed after edit)
0 Kudos
1 Solution

Accepted Solutions
BjornSvensson
Esri Regular Contributor

Hi Elvira, 
No, the Search widget does not work with StreamLayer.

See https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html 

View solution in original post

1 Reply
BjornSvensson
Esri Regular Contributor

Hi Elvira, 
No, the Search widget does not work with StreamLayer.

See https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html