PopupContentSchema
constPopupContentSchema:ZodArray<ZodRecord<ZodString,ZodArray<ZodType<{[key:string]:unknown;alt?:string;else?:string;format?:string;href?:string;property?:string;src?:string;str?:string| {$html:string; };text?:string; },ZodTypeDef, {[key:string]:unknown;alt?:string;else?:string;format?:string;href?:string;property?:string;src?:string;str?:string| {$html:string; };text?:string; }>,"many">>,"many">
Defined in: packages/core/src/schemas/layer.schema.ts:165
Popup content structure.
Remarks
Section titled “Remarks”Array of HTML elements where each element is { tagName: [items] }.
Elements are rendered in order to build popup HTML.
Supported Tags: h1, h2, h3, h4, h5, h6, p, span, div, strong, em, code, pre, a, img, iframe, ul, ol, li, blockquote, hr, br
Example
Section titled “Example”popup: - h3: - property: name else: "Unknown" - p: - str: "Population: " - property: population format: ",.0f" - a: - href: "https://example.com" text: "Learn more"Output for { name: "NYC", population: 8336817 }:
<h3>NYC</h3><p>Population: 8,336,817</p><a href="https://example.com">Learn more</a>