Skip to content

LayerRuntimeSchema

const LayerRuntimeSchema: ZodObject<{ effect: ZodOptional<ZodEffects<ZodObject<{ type: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ type: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ type: ZodString; }, ZodTypeAny, "passthrough">>, objectOutputType<{ type: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ type: ZodString; }, ZodTypeAny, "passthrough">>>; interactive: ZodType<{ click?: { action?: string; emit?: { event: string; payload?: Record<…, …>; }; flyTo?: { center?: […, …]; duration?: number; zoom?: number; }; popup?: Record<string, …[]>[]; zoomToFeature?: { duration?: number; maxZoom?: number; padding?: number; }; }; hover?: { cursor?: string; emit?: { event: string; payload?: Record<…, …>; }; highlight?: boolean; popup?: Record<string, …[]>[]; }; mouseenter?: { action?: string; }; mouseleave?: { action?: string; }; } | undefined, ZodTypeDef, { click?: { action?: string; emit?: { event: string; payload?: Record<…, …>; }; flyTo?: { center?: […, …]; duration?: number; zoom?: number; }; popup?: Record<string, …[]>[]; zoomToFeature?: { duration?: number; maxZoom?: number; padding?: number; }; }; hover?: { cursor?: string; emit?: { event: string; payload?: Record<…, …>; }; highlight?: boolean; popup?: Record<string, …[]>[]; }; mouseenter?: { action?: string; }; mouseleave?: { action?: string; }; } | undefined>; label: ZodOptional<ZodString>; legend: ZodOptional<ZodObject<{ color: ZodString; icon: ZodOptional<ZodString>; label: ZodString; shape: ZodDefault<ZodEnum<["circle", "square", "line", "icon"]>>; }, "strip", ZodTypeAny, { color: string; icon?: string; label: string; shape: "circle" | "line" | "square" | "icon"; }, { color: string; icon?: string; label: string; shape?: "circle" | "line" | "square" | "icon"; }>>; toggleable: ZodOptional<ZodBoolean>; }, "passthrough", ZodTypeAny, objectOutputType<{ effect: ZodOptional<ZodEffects<ZodObject<{ type: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ type: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ type: ZodString; }, ZodTypeAny, "passthrough">>, objectOutputType<{ type: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ type: ZodString; }, ZodTypeAny, "passthrough">>>; interactive: ZodType<{ click?: { action?: string; emit?: { event: string; payload?: … | …; }; flyTo?: { center?: … | …; duration?: … | …; zoom?: … | …; }; popup?: Record<…, …>[]; zoomToFeature?: { duration?: … | …; maxZoom?: … | …; padding?: … | …; }; }; hover?: { cursor?: string; emit?: { event: string; payload?: … | …; }; highlight?: boolean; popup?: Record<…, …>[]; }; mouseenter?: { action?: string; }; mouseleave?: { action?: string; }; } | undefined, ZodTypeDef, { click?: { action?: string; emit?: { event: string; payload?: … | …; }; flyTo?: { center?: … | …; duration?: … | …; zoom?: … | …; }; popup?: Record<…, …>[]; zoomToFeature?: { duration?: … | …; maxZoom?: … | …; padding?: … | …; }; }; hover?: { cursor?: string; emit?: { event: string; payload?: … | …; }; highlight?: boolean; popup?: Record<…, …>[]; }; mouseenter?: { action?: string; }; mouseleave?: { action?: string; }; } | undefined>; label: ZodOptional<ZodString>; legend: ZodOptional<ZodObject<{ color: ZodString; icon: ZodOptional<ZodString>; label: ZodString; shape: ZodDefault<ZodEnum<["circle", "square", "line", "icon"]>>; }, "strip", ZodTypeAny, { color: string; icon?: string; label: string; shape: "circle" | "line" | "square" | "icon"; }, { color: string; icon?: string; label: string; shape?: "circle" | "line" | "square" | "icon"; }>>; toggleable: ZodOptional<ZodBoolean>; }, ZodTypeAny, "passthrough">, objectInputType<{ effect: ZodOptional<ZodEffects<ZodObject<{ type: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ type: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ type: ZodString; }, ZodTypeAny, "passthrough">>, objectOutputType<{ type: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ type: ZodString; }, ZodTypeAny, "passthrough">>>; interactive: ZodType<{ click?: { action?: string; emit?: { event: string; payload?: … | …; }; flyTo?: { center?: … | …; duration?: … | …; zoom?: … | …; }; popup?: Record<…, …>[]; zoomToFeature?: { duration?: … | …; maxZoom?: … | …; padding?: … | …; }; }; hover?: { cursor?: string; emit?: { event: string; payload?: … | …; }; highlight?: boolean; popup?: Record<…, …>[]; }; mouseenter?: { action?: string; }; mouseleave?: { action?: string; }; } | undefined, ZodTypeDef, { click?: { action?: string; emit?: { event: string; payload?: … | …; }; flyTo?: { center?: … | …; duration?: … | …; zoom?: … | …; }; popup?: Record<…, …>[]; zoomToFeature?: { duration?: … | …; maxZoom?: … | …; padding?: … | …; }; }; hover?: { cursor?: string; emit?: { event: string; payload?: … | …; }; highlight?: boolean; popup?: Record<…, …>[]; }; mouseenter?: { action?: string; }; mouseleave?: { action?: string; }; } | undefined>; label: ZodOptional<ZodString>; legend: ZodOptional<ZodObject<{ color: ZodString; icon: ZodOptional<ZodString>; label: ZodString; shape: ZodDefault<ZodEnum<["circle", "square", "line", "icon"]>>; }, "strip", ZodTypeAny, { color: string; icon?: string; label: string; shape: "circle" | "line" | "square" | "icon"; }, { color: string; icon?: string; label: string; shape?: "circle" | "line" | "square" | "icon"; }>>; toggleable: ZodOptional<ZodBoolean>; }, ZodTypeAny, "passthrough">>

Defined in: packages/core/src/schemas/map-v2.schema.ts:290

Per-layer runtime: — interactions, legend entry, label, toggle state.

In v1 these sit inline on the layer; v2 nests them here. The sub-shapes are reused from layer.schema.ts verbatim.