LogoLogo
Sign upHelp CenterContactSocial
Home
Home
  • Overview
  • REST API
    • Getting started
    • Navigating maps and workspaces
    • Uploading files and URLs
    • Styling layers
    • Refreshing live data layers
    • Working with elements
    • Listening to updates using webhooks
    • API Reference
      • Authentication
      • Maps
      • Layers
      • Elements
      • Users
      • Comments
      • Embed Tokens
      • Sources
      • Projects
  • JS SDK
    • Getting started
    • General concepts
    • Controlling maps
    • Working with selection
    • Reading entities
    • Drawing elements
    • Working with layers
    • Layer filters
    • Building custom charts
    • Map interactions and viewport
    • Hiding and showing
    • Integrating with React
    • Sample application
    • Examples
    • API Reference
  • Felt Style Language
    • Getting started
    • Style definition blocks
      • The config block
      • The paint block
      • The label block
      • The legend block
      • The popup block
      • The attributes block
      • The filters block
    • Types of visualizations
      • Simple visualizations
      • Categorical visualizations
      • Numeric visualizations (color & size)
      • Heatmaps
      • Hillshade
    • Zoom-based Styling
      • Interpolators
    • Legends
    • Errors
    • Examples
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Felt Style Language
  2. Style definition blocks

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

titleAttribute

Optional. The attribute that will be 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 either “table” or “list”. The way the popup will show its contents. Defaults to "table"

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 in the popup. If it’s defined, all attributes here will show even if the selected feature doesn’t include them.

Example of a popup block
"popup": {
  "keyAttributes": [
    "osm_id",
    "barriers",
    "highway",
    "ref",
    "is_in",
    "place",
    "man_made",
    "other_tags"
  ],
  "titleAttribute": "barriers",
  "popupLayout": "list"
}
PreviousThe legend blockNextThe attributes block

Last updated 1 year ago

Was this helpful?