Encapsulates the creation and lifecycle of PopupTemplates.

interface PopupDefinition {
    cleanupPopupTemplate(layerOrStore: any): void;
    resolvePopupTemplate(layer: Layer): any;
    resolvePopupTemplateForStore(
        store: Store,
        storeProperties: Record<string, any>,
    ): any;
}

Methods

  • Hook to cleanup resources cached for a given popuptemplate or layer.

    Function is triggered by the custom popup engine if a layer is removed from the map.

    Parameters

    • layerOrStore: any

      instance (either Layer or StoreInstance for which the popup template was created.

    Returns void

  • Provides a PopupTemplate (definition) for a layer. Function is triggered by the custom popup engine to resolve PopupTemplate information as soon as a layer is registered inside a map.

    Parameters

    • layer: Layer

      Instance for which the popup template should be created.

    Returns any

    The resolved template, see https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html.

  • Provides a PopupTemplate (definition) for a store. Function is triggered by the custom popup engine to resolve PopupTemplate information as soon as a store is registered in the system.

    Parameters

    • store: Store

      Instance for which the popup template should be created.

    • storeProperties: Record<string, any>

      Additional information about the store instance.

    Returns any

    The resolved template, see https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html.