Developing the CustomSearch function to use feature/streaming layers from portal

338
2
07-27-2022 02:00 AM
hersingerpetter
New Contributor II

Hello! I want to modify the code from the Custom Search function (https://developers.arcgis.com/javascript/latest/sample-code/widgets-search-customsource/) to be able to search for feature/streaming layers on the map that I have imported from the portal. At the moment I have modified the sample code, but I still search for adresses and not feature layers.

How would I do this in the best way? 

I am new to ArcGIS and ESRI products so any help would be greatly appreaciated.

0 Kudos
2 Replies
Noah-Sager
Esri Regular Contributor

Hi @hersingerpetter, you'll want to use this sample as a guide instead if you want to use layers as a source: https://developers.arcgis.com/javascript/latest/sample-code/widgets-search-multiplesource/

 

0 Kudos
hersingerpetter
New Contributor II

Okay, thank you! Do I pass in my portal id and each individual feature layer ID or can I pull features from the portal ID?

0 Kudos