API Documentation
    Preparing search index...

    Interface AGSStore

    The type of stores created by the AGSStoreFactory.

    interface AGSStore {
        get(
            id: AllowedIdTypes,
            options?: GetOptions,
        ): Promise<Readonly<Record<string, any>> | undefined>;
        getIdentity?(item: Partial<ItemType>): AllowedIdTypes | undefined;
        getMetadata(): Promise<Metadata>;
        id: string | undefined;
        idProperty?: string;
        layer: Layer | Sublayer;
        load(): Promise<void>;
        query(
            query?: ComplexQueryExpression,
            options?: QueryOptions,
        ): AsyncQueryResult<Readonly<Record<string, any>>>;
        target: string | undefined;
        url: string | undefined;
    }

    Hierarchy

    • AsyncStore
      • AGSStore
    Index

    Properties

    id: string | undefined

    ID of the store.

    idProperty?: string

    Name of the property used as ID. If not provided, the 'getIdentity' method must be declared.

    layer: Layer | Sublayer

    The layer used by this store.

    target: string | undefined

    Use url instead.

    url: string | undefined

    The URL of the layer queried by this store. Undefined if this store works on a client side layer.

    Methods

    • Retrieves an item by its identifier.

      Parameters

      • id: AllowedIdTypes

        id of an item in the store.

      • Optionaloptions: GetOptions

        options to specify the result.

      Returns Promise<Readonly<Record<string, any>> | undefined>

    • Returns an items‘s identity. This must always execute synchronously.

      Parameters

      • item: Partial<ItemType>

        the item.

      Returns AllowedIdTypes | undefined

      the ID

    • Returns any available metadata about the store. This may include attribution, available fields, cache directives, history or version information.

      Returns Promise<Metadata>

    • Manually loads required metadata from backend services if needed.

      Some methods (such as query) may not be available before metadata have been loaded.

      Note: Metadata can also be loaded by calling AsyncStore.getMetadata.

      Returns Promise<void>

    • Queries the store using the provided query.

      Parameters

      • Optionalquery: ComplexQueryExpression

        a query to execute.

      • Optionaloptions: QueryOptions

        the query options.

      Returns AsyncQueryResult<Readonly<Record<string, any>>>