Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • LayertreeTreeManager

Index

Properties

$injector_: IInjectorService
$timeout_: ITimeoutService
gettextCatalog_: gettextCatalog
gmfThemes_: any
groupsToAddInThisDigestLoop_: any[]
initialLevelFirstGroups_: any[]
layerHelper_: LayerHelper
ngeoStateManager_: StatemanagerService
numberOfGroupsToAddInThisDigestLoop: number

Number of groups to add to the layertree during one single Angular digest loop.

ogcServers_: any

A reference to the OGC servers loaded by the theme service.

promiseForGroupsToAddInThisDigestLoop_: IPromise<void>
root: any

The root node and its children used to generate the layertree (with the same ordre).

The controller of the (unique) root layer tree. The array of top level layer trees is available through rootCtrl.children. The order doesn't match with the ordre of the displayed layertree.

Methods

  • addFirstLevelGroup_(group: any): boolean
  • Add a group as tree's children without consideration of this service 'mode'. Add it only if it's not already in the tree.

    Parameters

    • group: any

      The group to add.

    Returns boolean

    true if the group has been added.

  • addFirstLevelGroups(firstLevelGroups: any[], opt_add: boolean, opt_silent: boolean): boolean
  • Add some groups as tree's children. If the service use mode 'flush', the previous tree's children will be removed. Add only groups that are not already in the tree.

    Parameters

    • firstLevelGroups: any[]

      An array of gmf theme group.

    • opt_add: boolean
    • opt_silent: boolean

    Returns boolean

    True if the group has been added. False otherwise.

  • addGroupByLayerName(layerName: string, opt_add: boolean, opt_silent: boolean): void
  • Retrieve a group by the name of a layer that is contained in this group (first found). This group will be added in the tree. Do nothing if any corresponding group is found.

    Parameters

    • layerName: string

      Name of the layer inside the group to add.

    • opt_add: boolean
    • opt_silent: boolean

    Returns void

  • addGroupByName(groupName: string, opt_add: boolean): void
  • Retrieve a group (first found) by its name and add in the tree. Do nothing if any corresponding group is found.

    Parameters

    • groupName: string

      Name of the group to add.

    • opt_add: boolean

    Returns void

  • handleThemesChange_(): void
  • Called when the themes change. Get the OGC servers, then listen to the tree manager Layertree controllers array changes. The themes could have been changed so it also call a refresh of the layertree.

    Returns void

  • notifyCantAddGroups_(groups: any[]): void
  • Display a notification that informs that the given groups are already in the tree.

    Parameters

    • groups: any[]

      An array of groups that already in the tree.

    Returns void

  • parseTreeNodes(node: any): void
  • refreshFirstLevelGroups_(themes: any[]): void
  • Keep the state of each existing first-level-groups in the layertree then remove it and recreate it with nodes that come from the new theme and the corresponding saved state (when possible, otherwise, juste take the corresponding new node). FIXME: Currently doesn't save nor restore the opacity.

    Parameters

    • themes: any[]

      the array of themes to be based on.

    Returns void

  • removeAll(): void
  • removeGroup(group: any): void
  • Remove a group from this tree's children. The first group that is found ( based on its name) will be removed. If any is found, nothing will append.

    Parameters

    • group: any

      The group to remove.

    Returns void

  • removePopup_(node: any): void
  • reorderChild_(array: any[], old_index: number, new_index: number): void
  • Parameters

    • array: any[]

      An array of groups.

    • old_index: number

      The old index before reorder (the current one).

    • new_index: number

      The new index after reorder.

    Returns void

  • setFirstLevelGroups(firstLevelGroups: any[]): boolean
  • Set some groups as tree's children. If the service use mode 'flush', the previous tree's children will be removed. Add only groups that are not already in the tree.

    Parameters

    • firstLevelGroups: any[]

      An array of gmf theme group.

    Returns boolean

    True if the group has been added. False otherwise.

  • setInitialFirstLevelGroups(firstGroups: any[]): void
  • Set a node's metadata with the given fullState. Update also its children recursively with the fullState children.

    Parameters

    Returns any

    the node with modification.

  • toggleNodeCheck_(node: any, names: string[]): void
  • Set the child nodes metadata isChecked if its name is among the list of given names. If a child node also has children, check those instead.

    Parameters

    • node: any

      The original node.

    • names: string[]

      Array of node names to check (i.e. that should have their checkbox checked)

    Returns void

  • updateTreeGroupsState_(groups: any[], removedGroups: any[]): void
  • Update the application state with the list of first level groups in the tree.

    Parameters

    • groups: any[]

      current firstlevel groups of the tree.

    • removedGroups: any[]

      groups removed within this operation.

    Returns void

Generated using TypeDoc