Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents the site's layer list, also known as table of contents.

Hierarchy

Index

Constructors

constructor

  • Creates a new instance of the (@link LayerList} class

    Parameters

    • appInfo: AppInfo
    • Optional url: string

      Optional. The URL for the essentials layer list rest endpoint if the layer list rest endpoint is not available

    • Optional layerListRestEndpoint: RestLayerList

      Optional. The layer list rest endpoint if available. If this is available, the url will not be used

    • Optional options: LayerListConfigurationParams

      Optional. An object containing options to configure the layer list

    Returns LayerList

Events

onLayerListInitializationFailed

onLayerListInitializationFailed: function

Occurs when initialization of the layer list fails.

Type declaration

    • (error: Error): void
    • Parameters

      • error: Error

      Returns void

onLayerListInitialized

onLayerListInitialized: function

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.

Type declaration

Properties

_addedFolderReferences

_addedFolderReferences: LayerListFolderItem[]

_allMapServiceReferences

_allMapServiceReferences: ServiceLayerInfo[]

_displayItemBindingToken

_displayItemBindingToken: string

Binding token for LayerListItem.displayItem (if any), used by the LayerListItemCollection class.

_handledMapServiceReferences

_handledMapServiceReferences: ServiceLayerInfo[]

_libraryId

_libraryId: string

Internal members

_outOfFolderMapServiceReferences

_outOfFolderMapServiceReferences: ServiceLayerInfo[]

_visibilityBindingToken

_visibilityBindingToken: string

Visibility binding token (if any), used by the LayerListItemCollection class to manage visibilities

appInfo

appInfo: AppInfo

The intermediary application info object for the layer list. Compatible with WAB

autoActivateAncestorVisibilities

autoActivateAncestorVisibilities: boolean

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.

children

A LayerListItemCollection object, representing the current node's children

enableLayerIcons

enableLayerIcons: boolean

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

enableLegendIntegration

enableLegendIntegration: boolean

A boolean indicating whether legend integration should be enabled for this layer list

filterControlComponent

filterControlComponent: FilterControlComponent<LayerListItem>

The filter control view model.

id

id: Observable<string>

The unique identifier for this layer list item. Will be "GCXLayerListRootNode-[random string]" if this is the root node.

layerListInitializationFailure

layerListInitializationFailure: Error

The exception that occurred if the layer list could not be initialized.

layerListInitialized

layerListInitialized: boolean

Whether or not the layer list was successfully initialized.

mapInfo

mapInfo: MapInfo

The intermediary map info object for the layer list. Compatible with WAB.

multiLegendIconTooltip

multiLegendIconTooltip: string

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.

multiLegendSwatchElement

multiLegendSwatchElement: string

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.

onlyShowSwatchesOnVisibleLayers

onlyShowSwatchesOnVisibleLayers: boolean

A boolean indicating whether swatches are to be shown for invisible layers for this layer list

parent

The current node's parent - if any

serviceLoadFailureIconTooltip

serviceLoadFailureIconTooltip: string

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

serviceLoadFailureIconUri

serviceLoadFailureIconUri: string

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

singleLegendIconTooltip

singleLegendIconTooltip: string

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.

suspendMapUpdates

suspendMapUpdates: boolean

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.

url

url: string

The url for the layer list rest endpoint. If null or undefined, the configurable layer list will default to standard simple layer list behaviour

Methods

Private _applyDeferredItemVisibilities

  • _applyDeferredItemVisibilities(lLItemArray: LayerListItem[]): void
  • 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.

    Parameters

    Returns void

addUserAddedServiceLayer

  • Adds a user-added layer to the Layer List. Returns true if the layer was added, false otherwise.

    Parameters

    Returns boolean

getAncestors

getDescendants

getRoot

getSelfAndAncestors

getSelfAndDescendants

getSiblings

  • Gets all of this node's siblings, in the order that they appear in the layer list.

    Parameters

    • Optional includeSelf: boolean

    Returns LayerListNode[]

getUserAddedLayersFolderIndex

  • getUserAddedLayersFolderIndex(serviceLayer: any): number
  • 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.

    Parameters

    • serviceLayer: any

      That service layer whose index number within the user-added layers folder needs to be determined.

    Returns number

initialize

  • initialize(): void

removeServiceLayer

  • 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.

    Parameters

    Returns boolean

updateServiceLayer

  • Updates the layer list with the adds and removes for the given service. It will not add duplicate items.

    Parameters

    • mapService: MapService | ServiceLayerInfo

      The {@link essentials.MapService} or {@link: infrastructure.gis.ServiceLayerInfo} that contains the updates.

    • Optional newItems: Layer[]

      An array of {@link essentials.Layer} items that are being added to the layer list.

    • Optional oldItems: Layer[]

      An array of {@link essentials.Layer} items that are being removed from the layer list.

    Returns boolean

    A boolean of whether or not the update was successful.

updateServiceLayerLegendSwatch

  • updateServiceLayerLegendSwatch(mapService: MapService): boolean
  • Updates the legend items in the layer list for a given map service. Returns true if the layer was added, false otherwise.

    Parameters

    • mapService: MapService

      That map service that needs to have its layer list item updated.

    Returns boolean