ItemSelector class
The ItemSelector class allows you to search items of specified types in ArcGIS Enterprise and ArcGIS Online.
AMD Module Require
require(["jimu/dijit/ItemSelector"], function(ItemSelector) { /* code goes here */ });
Constructor
new ItemSelector (params, srcNodeRef) Creates a new ItemSelector dijit. Parameters: <Object> params—Required. Parameters for the ItemSelector dijit. <DOMNode | String> srcNodeRef—Optional. HTML element where ItemSelector is rendered. params properties: <String> portalUrl—Required. The portal URL of your portal, such as http://orgname.maps.arcgis.com or http://myportal.company.com/instancename. <String>[] itemTypes—Required. ItemSelector supports multiple item types to show items. Only items with specified types will show, such as ['Web Map'], ['Feature Service','Map Service'], and so on. <String>[] typeKeywords—Optional. ItemSelector also supports search by multiple type key words. Only items with specified typeKeywords will show, such as ['Web AppBuilder'], ['Web AppBuilder','Web Map'] and so on. Example:
|
Methods
getSelectedItem() Gets the selected item information. Return type: Object including item information. |
Events
item-selected Fires when you select an item. Example:
|
none-item-selected Fires when you clear all items. Example:
|