Skip to content

PopupContentItemSchema

const PopupContentItemSchema: z.ZodType<{[key: string]: unknown; alt?: string; else?: string; format?: string; href?: string; property?: string; src?: string; str?: string | { $html: string; }; text?: string; }>

Defined in: packages/core/src/schemas/layer.schema.ts:99

Content item for popup or dynamic text rendering.

Supports static strings, dynamic property interpolation, and fallback values.

Properties:

  • str - Static text string
  • property - Feature property name to interpolate
  • else - Fallback value if property is missing
  • format - Number format string (e.g., “,.0f” for thousands separator)
  • href - Link URL (for anchor tags)
  • text - Link text
  • src - Image/iframe source URL
  • alt - Image alt text

Static Text

- str: "Population: "

Dynamic Property

- property: name
else: "Unknown"

Formatted Number

- property: population
format: ",.0f"