Skip to content

TerriaReference

Creates a catalog group or item from url that points to a terria catalog json file.

Note:

  • The referenced json file may contain more items than you need.
  • Specify required catalog entry IDs (e.g. "LAEMW8fc") in path. If not specified, the whole catalog will be added.
  • If the reference is a group, it is helpful to set isGroup to true.
  • Example usage

    {
      "type": "terria-reference",
      "url": "https://tiles.terria.io/terriajs-examples/terria-reference/a-terria-catalog.json",
      "isGroup": true,
      "path": [
        "LAEMW8fc"
      ],
      "name": "terria-reference example",
      "id": "some unique id for terria-reference example"
    }
    

    TerriaReferenceTraits

    Trait Type Default Description
    isOpen boolean

    True if this group is open and its contents are visible; otherwise, false. (This only applies if isGroup = true)

    path string[]

    The path to the catalog item or group in the target catalog file given as a list of IDs. If not given, Terria will create a pseudo-group with all the catalog items in the catalog file as its members.

    CatalogMemberReferenceTraits
    name string

    The name to use for this catalog member before the reference is loaded.

    description string

    The description to use for this catalog member before the reference is loaded. Markdown and HTML may be used.

    dataCustodian string

    Gets or sets a description of the custodian of this data item.

    isGroup boolean

    Is the target of this reference expected to be a catalog group?

    isFunction boolean

    Is the target of this reference expected to be a catalog function?

    isMappable boolean

    Is the target of this reference expected to have map items?

    isChartable boolean

    Is the target of this reference expected to have chart items?

    ItemPropertiesTraits
    itemProperties any

    Sets traits on group member items (note - will not set traits to sub-groups). This applies to all nested group members (eg members in sub-groups). Also see itemPropertiesByType and itemPropertiesByIds.

    Item properties will be set in the following order (highest to lowest priority) itemPropertiesByIds, itemPropertiesByType, itemProperties.

    itemPropertiesByType ItemPropertiesByTypeTraits[]

    Sets traits on group member items by model type (eg csv or geojson). This applies to all nested group members (eg members in sub-groups). Only one itemProperties can be specified per type.

    Item properties will be set in the following order (highest to lowest priority) itemPropertiesByIds, itemPropertiesByType, itemProperties.

    itemPropertiesByIds ItemPropertiesByIdTraits[]

    Sets traits on group member items by model ID. This applies to all nested group members (eg members in sub-groups). Only one itemProperties can be specified per id.

    Item properties will be set in the following order (highest to lowest priority) itemPropertiesByIds, itemPropertiesByType, itemProperties.

    ReferenceTraits
    isOpenInWorkbench boolean true

    Whether the item in the workbench open or collapsed.

    UrlTraits
    url string

    The base URL of the file or service.

    forceProxy boolean

    Force the default proxy to be used for all network requests.

    cacheDuration string

    The cache duration to use for proxied URLs for this catalog member. If undefined, proxied URLs are effectively cachable forever. The duration is expressed as a Varnish-like duration string, such as '1d' (one day) or '10000s' (ten thousand seconds).

    ItemPropertiesByTypeTraits

    Trait Type Default Description
    type string

    The type of model to apply itemProperties to. This must be defined.

    itemProperties any

    Sets traits on group member items of specified type. This applies to all nested group members (eg members in sub-groups)

    ItemPropertiesByIdTraits

    Trait Type Default Description
    ids string[]

    The IDs of models to apply itemProperties to.

    itemProperties any

    Sets traits on group member items of specified id. This applies to all nested group members (eg members in sub-groups)