A collection of sublayer extensions belonging to a SublayerExtension.

Hierarchy (view full)

Constructors

Properties

_handles: Handles<unknown, ResourceHandle>

The SublayerExtension that owns this collection.

@eventTypes: CollectionEvents<SublayerExtension<SublayerExtensionProperties>>

Do not directly reference this property. Use EventNames and EventTypes helpers from @arcgis/core/Evented.

declaredClass: string = "esri.core.Collection"

The declared class name. This is always "esri.core.Collection" for compatibility with Esri's API.

Accessors

  • get destroyed(): boolean
  • Whether the collection has been destroyed.

    Returns boolean

  • set destroyed(value): void
  • Parameters

    • value: boolean

    Returns void

  • get initialized(): boolean
  • Whether the collection has been initialized.

    Returns boolean

  • set initialized(value): void
  • Set to true once the initialize function has executed.

    Parameters

    • value: boolean

    Returns void

  • get length(): number
  • The number of items in the collection.

    Returns number

Methods

  • Type Parameters

    • T

    Parameters

    • propertyName: string
    • value: T

    Returns this

    • Unsupported on CollectionProxy.
  • Returns the index of an item in the Collection if that item passes a test as defined in the callback function. Each item is passed into the callback function, which returns true if the item passes the test and false if it does not.

    Parameters

    Returns number

    Returns the index of the Collection item that satisfies the test function. If an item fails the test, -1 is returned.

  • Type Parameters

    • T

    Parameters

    • propertyPath: string

    Returns T

    • Unsupported on CollectionProxy.
  • Parameters

    • propertyPath: string

    Returns unknown

    • Unsupported on CollectionProxy.
  • Creates a string representation of the items in the Collection.

    Parameters

    • Optionalseparator: string

      The separator used between each item in the final string. The default is ",".

    Returns string

  • Returns the last index of an element in the collection.

    Parameters

    • searchElement: SublayerExtension<SublayerExtensionProperties>

      Item to search for in the collection.

    • OptionalfromIndex: number

      Use if you don't want to search the whole collection, or you don't want to search from the end.

    Returns number

    The location of the last match found in the collection, or -1 if there is no match.

  • Registers an event handler on the instance. Call this method to hook an event with a listener.

    Type Parameters

    Parameters

    Returns ResourceHandle

    Returns an event handler with a remove() method that should be called to stop listening for the event(s).

    Property Type Description
    remove Function When called, removes the listener from the event.
    view.on("click", function(event){
    // event is the event handle returned after the event fires.
    console.log(event.mapPoint);
    });
  • Type Parameters

    • T

    Parameters

    • propertyPath: string
    • value: T

    Returns this

    • Unsupported on CollectionProxy.
  • Parameters

    • properties: HashMap<unknown>

    Returns this

    • Unsupported on CollectionProxy.
  • Parameters

    • path: string | string[]
    • callback: ((newValue: any, oldValue: any, propertyName: string, target: any) => void)
        • (newValue, oldValue, propertyName, target): void
        • Parameters

          • newValue: any
          • oldValue: any
          • propertyName: string
          • target: any

          Returns void

    • Optionalsync: boolean

    Returns IHandle

    • Unsupported on CollectionProxy.