@vcmap/core
    Preparing search index...

    Class Category<T, S>

    A category contains user based items and is a special container. The container should not be created directly, but via the requestCategory API on the categories collection. Do not use toJSON to retrieve the state of a category, since categories outlive modules and may be changed with mergeOptions to no longer reflect your initial state. Requestors should keep track of the requested options themselves.

    Type Parameters

    • T extends VcsObject | object = VcsObject | object

      the type of objects in this category

    • S extends object = object

      the serialized state of the object in this category

    Hierarchy (View Summary)

    Index

    Accessors

    • get className(): string

      Returns string

    • get layer(): VectorLayer | null

      Returns the layer of this collection. Caution, do not use the layer API to add or remove items. When adding items to the collection, the features are added to the layer async (timeout of 0), since there is weird behavior when removing and adding a feature with the same id in the same sync call.

      Returns VectorLayer | null

    Constructors

    Methods

    • Throws if typed, featureProperty and keyProperty do not match. Merges other options. Only merges: style, highlightStyle, zIndex & vectorProperties from layerOptions.

      Parameters

      Returns void

    • Parameters

      • moduleId: string

      Returns { items: object[]; name: string } | null

    Properties

    _app: VcsApp | null = null
    _layer: VectorLayer | null
    "[moduleIdSymbol]"?: string
    isDestroyed: boolean
    name: string

    unique Name

    properties: Record<string, unknown>
    title: string