Skip to content

GlobalConfigSchema

const GlobalConfigSchema: ZodObject<{ dataFetching: ZodOptional<ZodObject<{ defaultStrategy: ZodDefault<ZodEnum<["runtime", "build", "hybrid"]>>; retryAttempts: ZodDefault<ZodNumber>; timeout: ZodDefault<ZodNumber>; }, "strip", ZodTypeAny, { defaultStrategy: "runtime" | "build" | "hybrid"; retryAttempts: number; timeout: number; }, { defaultStrategy?: "runtime" | "build" | "hybrid"; retryAttempts?: number; timeout?: number; }>>; defaultCenter: ZodOptional<ZodTuple<[ZodNumber, ZodNumber], null>>; defaultMapStyle: ZodOptional<ZodEffects<ZodEffects<ZodUnion<[ZodString, ZodObject<{ flavor: ZodOptional<ZodEnum<…>>; glyphs: ZodOptional<ZodString>; lang: ZodOptional<ZodEnum<…>>; pmtiles: ZodString; sprite: ZodOptional<ZodString>; }, "passthrough", ZodTypeAny, objectOutputType<{ flavor: ZodOptional<…>; glyphs: ZodOptional<…>; lang: ZodOptional<…>; pmtiles: ZodString; sprite: ZodOptional<…>; }, ZodTypeAny, "passthrough">, objectInputType<{ flavor: ZodOptional<…>; glyphs: ZodOptional<…>; lang: ZodOptional<…>; pmtiles: ZodString; sprite: ZodOptional<…>; }, ZodTypeAny, "passthrough">>, ZodAny]>, any, any>, unknown, any>>; defaultZoom: ZodOptional<ZodNumber>; description: ZodOptional<ZodString>; theme: ZodDefault<ZodEnum<["light", "dark"]>>; title: ZodOptional<ZodString>; }, "strip", ZodTypeAny, { dataFetching?: { defaultStrategy: "runtime" | "build" | "hybrid"; retryAttempts: number; timeout: number; }; defaultCenter?: [number, number]; defaultMapStyle?: unknown; defaultZoom?: number; description?: string; theme: "light" | "dark"; title?: string; }, { dataFetching?: { defaultStrategy?: "runtime" | "build" | "hybrid"; retryAttempts?: number; timeout?: number; }; defaultCenter?: [number, number]; defaultMapStyle?: any; defaultZoom?: number; description?: string; theme?: "light" | "dark"; title?: string; }>

Defined in: packages/core/src/schemas/page.schema.ts:259

Global configuration.

Global settings that apply across all pages.

General:

  • title - Application title
  • description - Application description
  • defaultMapStyle - Default map style for all maps
  • theme - Default theme (light/dark)

Data Fetching:

  • defaultStrategy - Default fetch strategy (runtime, build, hybrid)
  • timeout - Default fetch timeout
  • retryAttempts - Default retry attempts

Basic Config

config:
title: "My Map App"
description: "Interactive maps and stories"
defaultMapStyle: "https://tiles.openfreemap.org/styles/liberty"

With Data Fetching

config:
title: "My Map App"
defaultMapStyle: "https://tiles.openfreemap.org/styles/liberty"
theme: dark
dataFetching:
defaultStrategy: build
timeout: 15000
retryAttempts: 5