Class UrlIdAttributeProvider

Provides attributes for features by fetching data from a URL based on feature IDs. The URL template should contain a {id} placeholder that will be replaced with the encoded feature ID. urlTemplate: 'https://api.example.com/features/{id}' For a feature with ID "123", this would request: https://api.example.com/features/123

The backend should return a JSON object with attribute key-value pairs. { "name": "Feature Name", "description": "Feature description", "value": 42 } If the request fails or returns invalid data, the provider returns undefined.

Hierarchy (view full)

Accessors

  • get className(): string
  • Returns string

Constructors

Methods

  • Protected

    Optional bulk attribute retrieval for multiple keys. Can be implemented for optimal loading of data. Provides a webmercator extent to limit the lookup if needed. You MUST return a same length array as keys, with undefined for missing attributes.

    Parameters

    • bulk: {
          feature: EventFeature;
          key: string;
      }[]

      array of key and feature pairs to retrieve attributes for

    • Optional_extent: Extent

      optional extent in webmercator to limit attribute lookup on certain providers.

    Returns Promise<(undefined | Record<string, unknown>)[]>

Properties

[moduleIdSymbol]?: string
isDestroyed: boolean
keyProperty?: string
name: string

unique Name

properties: Record<string, unknown>