Creates a new instance of the (@link LayerList} class
Optional. The URL for the essentials layer list rest endpoint if the layer list rest endpoint is not available
Optional. The layer list rest endpoint if available. If this is available, the url will not be used
Optional. An object containing options to configure the layer list
Occurs when initialization of the layer list fails.
Occurs when initialization of the layer list succeeds with a response from the REST endpoint. Depending on the API, this response may actually be an error message served as a correct HTTP response.
Binding token for LayerListItem.displayItem (if any), used by the LayerListItemCollection class.
Internal members
Visibility binding token (if any), used by the LayerListItemCollection class to manage visibilities
The intermediary application info object for the layer list. Compatible with WAB
A boolean indicating whether visibility all parent items should be automatically activated/set to true when the visibility of an item is set to true. In effect, this setting ensures that an item when set to visible will necessarily be effectively visible as well.
A LayerListItemCollection object, representing the current node's children
Determines whether layer icons are enabled or not. False by default. If true, layer icons will be populated for layer items which have them configured and which do not have a legend
A boolean indicating whether legend integration should be enabled for this layer list
The filter control view model.
The unique identifier for this layer list item. Will be "GCXLayerListRootNode-[random string]" if this is the root node.
The exception that occurred if the layer list could not be initialized.
Whether or not the layer list was successfully initialized.
The intermediary map info object for the layer list. Compatible with WAB.
The legend icon tooltip to use when only a single legend item exists for a layer. This is optional and will be used only if set.
The swatch element to be displayed if an item contains multiple legend items. If only one legend item exists, that will be used as the swatch element. If multiple swatch elements exist but this parameter is not configured, the first legend item swatch element will be used.
A boolean indicating whether swatches are to be shown for invisible layers for this layer list
The current node's parent - if any
The icon tooltip to be set if a layer fails to initialize. This is an optional property and will only be used if configured during initialization
The icon Uri to be set if a layer fails to initialize. This is an optional property and will only be used if configured during initialization
The legend icon tooltip to use when only a single legend item exists for a layer. This is optional and will be used only if set.
If set to true, then changing items' visibilities will not update the map until this setting is turned off, at which point all the new visibility settings will be applied. This setting is useful when changing the visibilities of mulitple items at once, since it avoid unnecessary map updates.
The url for the layer list rest endpoint. If null or undefined, the configurable layer list will default to standard simple layer list behaviour
This is an internal function, though not private to this class. The configurable layer list initializes all layers and filters layer visibilities based on configuration settings and preset rules. In order to avoid flickers on the map and excessive visibility requests, all visibilities are applied at once after processing is complete. This function should be invoked in order to finally apply these visibilities after all processing is completed.
Adds a user-added layer to the Layer List. Returns true if the layer was added, false otherwise.
Gets the collection of ancestor nodes, ordered from nearest to farthest.
Gets all of this node's descendant items, in depth-first traversal order.
Gets the root node in the layer list hierarchy.
Gets this node, as well as it's ancestors, ordered from nearest to farthest
Gets this node, as well as it's descendants, in depth-first traversal order
Gets all of this node's siblings, in the order that they appear in the layer list.
Obtains the index value within the user-added layers folder for a given service layer. Returns the value of the index. If the index value does not exist, returns null.
That service layer whose index number within the user-added layers folder needs to be determined.
Initializes this instance of the LayerList class. This is an asynchronous method, you may subscribe to the onLayerListInitialized and onLayerListInitializationFailed events for completion information.
Removes the specified service layer from the layer list. Since the layer list is configurable, the sub layers of a particular service layer may be spread out across the list so we need to check all items to ensure that the service layer is completely removed from the list. Returns true if the layer was found and removed, false otherwise.
Updates the layer list with the adds and removes for the given service. It will not add duplicate items.
The {@link essentials.MapService} or {@link: infrastructure.gis.ServiceLayerInfo} that contains the updates.
An array of {@link essentials.Layer} items that are being added to the layer list.
An array of {@link essentials.Layer} items that are being removed from the layer list.
A boolean of whether or not the update was successful.
Updates the legend items in the layer list for a given map service. Returns true if the layer was added, false otherwise.
That map service that needs to have its layer list item updated.
Represents the site's layer list, also known as table of contents.