For the complete documentation index, see llms.txt. This page is also available as Markdown.

The popup block

The popup block contains information on how the popup is displayed and which attributes to show.

These are the fields that each popup block can contain:

Field name
Description

type

Optional. "attributes" (default), "iframe", or "html".

titleAttribute

Optional. The attribute (or attributes) used to title the popup if available.

imageAttribute

Optional. The attribute that will be used to populate the popup image if available.

popupLayout

Optional. One of "table" or "list". The way the popup shows its contents. Defaults to "table".

popupLocation

Optional. Where the popup appears: "onMap", "leftSidebar", "rightSidebar", or "modal".

headerLayout

Optional. "standard", "compact", or "none".

keyAttributes

Optional. A list of attributes to show in the popup following the order defined here. If it’s not defined, only attributes with a value will show. If it’s defined, all listed attributes show even when the selected feature doesn’t include them.

Example of a popup block
"popup": {
  "titleAttribute": "name",
  "keyAttributes": ["osm_id", "highway", "ref", "place"],
  "popupLayout": "list",
  "popupLocation": "onMap",
  "headerLayout": "standard"
}

Iframe and HTML popups

An iframe popup embeds external content. Use the template syntax {{column_name}} (or {{['Column Name']}} for names with spaces) to inject feature values into the URL or HTML.

Iframe popup
"popup": {
  "type": "iframe",
  "url": "https://example.com/details/{{id}}",
  "popupLocation": "modal",
  "width": 600,
  "height": 800
}

H3 aggregation attributes

H3 hexes show aggregated values rather than raw feature attributes, so their popups reference special attribute names:

  • "felt:cluster_size" — number of features in the hex

  • "felt:sum:column", "felt:mean:column", "felt:min:column", "felt:max:column" — aggregates of column

Last updated

Was this helpful?