A class that represents a generic item in the legend.

Hierarchy (view full)

Constructors

Properties

The instance of RampMap API scoped to a single Vue R4MP application.

APIScope

_children: LegendItem[] = []
_controls: undefined | LegendControl[]
_coverIcon?: string
_customSymbology: boolean = false
_description?: string
_disabledControls: undefined | LegendControl[]
_exclusive: boolean
_expanded: boolean
_hidden: boolean
_isSublayer: boolean = false
_lastVisible?: LegendItem
_layer: undefined | LayerInstance
_layerControls: LayerControl[]
_layerDisabledControls: LayerControl[]
_layerId: string
_layerIdx?: number
_layerInitVis: undefined | boolean
_layerOffscale: boolean = false
_layerRedrawing: boolean = false
_layerUid: string = ''
_loadPromise: DefPromise<void>
_maxLines: undefined | number
_name: string
_origLayerControls: undefined | LayerControl[]
_origLayerDisabledControls: undefined | LayerControl[]
_parent?: LegendItem = undefined
_symbologyExpanded: boolean
_symbologyRenderStyle: string
_symbologyStack: LegendSymbology[]
_treeGrown: boolean = false
_type: LegendType
_uid: string
_visibility: boolean
_visibleChildren: LegendItem[]
handlers: string[] = []

Accessors

  • get $element(): App<Element>
  • Returns App<Element>

  • get $vApp(): ComponentPublicInstance
  • The instance of Vue R4MP application controlled by this InstanceAPI. This is just a shorthand for this.$iApi.$vApp.

    Returns ComponentPublicInstance

    APIScope

Methods

  • Executes the "click" logic on a symbology item. Sets the checkbox visibility, propagates any edge-cases to this layer item, and applies any filters to the layer

    Parameters

    • uid: string

      the uid of the legend symbology

    • visible: boolean

      if we are clicking it on or off

    Returns void

  • Simulates a "click" interaction on a symbology item at a specific index in the symbol stack

    Parameters

    • index: number

      the index of the legend symbology

    • visible: boolean

      if we are clicking it on or off

    Returns void

  • Check if a control is available for the legend item. Returns:

    • true if the control is included in legend item's available controls
    • false if control is not included, or if control is disabled
    • undefined if controls are not defined

    Parameters

    Returns undefined | boolean

  • Have the item adapt and update to the given layer as it loads. Is either called in the constructor, or through the legend api

    Parameters

    • layer: undefined | LayerInstance

      the layer to load. If undefined, layer will be fetched via instance API using id/uid.

    Returns void

  • Sets the visibility of the symbology with the given uid If the provided UID is undefined, set the visibility of all symbols Only changes the visible state of the checkbox. Does not apply symbol filters.

    Parameters

    • uid: undefined | string

      the uid of the legend symbology

    • visible: boolean

      The new visibility value

    Returns void

  • Toggles the symbology expand and returns the new value

    Parameters

    • Optionalexpanded: boolean

      optional parameter to toggle expanded to a certain value

    Returns boolean

  • Toggle visibility state of a layer item. Needs to verify parent visibility is updated.

    Parameters

    • Optionalvisible: boolean
    • updateParent: boolean = true

      whether or not toggleVisibility should 'bubble-up' the legend tree

    • forceUpdate: boolean = false

      ignore control check, used when visibility is changed outside of legend fixture

    Returns void