Skip to content

ProjectionSchema

const ProjectionSchema: ZodObject<{ type: ZodEnum<["mercator", "globe"]>; }, "strip", ZodTypeAny, { type: "globe" | "mercator"; }, { type: "globe" | "mercator"; }>

Defined in: packages/core/src/schemas/map.schema.ts:720

Map projection (U15, ml-chh.6) — the style spec’s root projection.

mercator (the default) or globe. Style half: live, map.setProjection; on export it compiles verbatim to the style.json root (class exports).

Globe needs maplibre-gl 5.0.0. On a 4.x runtime there is no setProjection: the document warns once and renders in mercator — a declared absence at runtime, never a silent one.

projection:
type: globe

Style spec: projection