Find web map portal items by using a search term.

Use case
Portals can contain many portal items and, at times, you may wish to query the portal to find what you’re looking for. In this example, we search for web map portal items using a text search.
How to use the sample
Enter search terms into the search bar. Once the search is complete, a list is populated with the resultant web maps. Tap on a web map to set it to the map view. Scrolling to the bottom of the web map list view will get more results.
How it works
- Create a new
Portaland load it. - Create new
PortalItemQueryParameters. Set the type to web map by addingtype:"Web Map"and add the text you want to search for. Note that web maps authored prior to July 2nd, 2014, are not supported. You can also limit the query to only return maps published after that date. - Use
findItems(queryParameters:)to get the first set of matching items (10 by default). - Get more results using the
nextQueryParametersfrom thePortalQueryResultSet.
Relevant API
- Portal
- PortalItem
- PortalQueryParameters
- PortalQueryResultSet
Tags
keyword, query, search, web map