Skip to content

InteractiveConfigSchema

const InteractiveConfigSchema: z.ZodType<{ click?: { action?: string; emit?: EmitConfig; flyTo?: { center?: [number, number]; duration?: number; zoom?: number; }; popup?: any[]; zoomToFeature?: { duration?: number; maxZoom?: number; padding?: number; }; }; hover?: { cursor?: string; emit?: EmitConfig; highlight?: boolean; popup?: any[]; }; mouseenter?: { action?: string; }; mouseleave?: { action?: string; }; } | undefined>

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

Interactive event configuration for layers.

Defines hover and click behaviors for map features.

Events:

  • hover - Cursor and highlight on mouseover
  • click - Popup, actions, or navigation on click
  • mouseenter - Custom action on mouse enter
  • mouseleave - Custom action on mouse leave

Hover Cursor

interactive:
hover:
cursor: pointer

Click Popup

interactive:
click:
popup:
- h3:
- property: name
- p:
- property: description

Click with FlyTo

interactive:
click:
flyTo:
zoom: 15
duration: 1000