StyleHalf
Defined in: packages/core/src/model/types.ts:79
The half that compiles to style.json.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
basemap? | any | The base style merged in at compile time. mapStyle in v1 surface syntax. | packages/core/src/model/types.ts:81 |
camera | CameraModel | - | packages/core/src/model/types.ts:82 |
images? | Record<string, string | { pixelRatio?: number; sdf?: boolean; url: string; }> | Named images for symbol layers and patterns (U6, R9). Remarks Style half because it fully compiles: live, the renderer addImages each before layers; on export the images are fetched at compile time and merged into the document sprite (class exports). | packages/core/src/model/types.ts:112 |
layers | LayerModel[] | - | packages/core/src/model/types.ts:137 |
light? | object | The style-spec root light (U10′). Remarks Spec-native, so it compiles straight through to the emitted style.json root (class exports). Live, the renderer applies it with map.setLight — the live style is built from mapStyle + addLayer, so it cannot ride in on the style object. | packages/core/src/model/types.ts:135 |
light.anchor? | any[] | "map" | "viewport" | - | packages/core/src/schemas/map.schema.ts:746 |
light.color? | string | any[] | - | packages/core/src/schemas/map.schema.ts:758 |
light.intensity? | number | any[] | - | packages/core/src/schemas/map.schema.ts:761 |
light.position? | any[] | [number, number, number] | - | packages/core/src/schemas/map.schema.ts:752 |
metadata? | Record<string, unknown> | Style-spec root metadata (a v2 style.metadata slot). Remarks The style spec carries a free-form metadata object at its root, so this compiles through to the emitted style.json root rather than being dropped — the never-drop discipline that governs the rest of the style half. It has no v1 surface (v1 config.metadata is a Map option that lands in RuntimeHalf.map), so it is absent from AE2 pairs and never causes a v1/v2 divergence. | packages/core/src/model/types.ts:103 |
projection? | object | Map projection (U15) — the style-spec root projection. | packages/core/src/model/types.ts:125 |
projection.type | "globe" | "mercator" | - | packages/core/src/schemas/map.schema.ts:722 |
sky? | object | Sky / fog / globe atmosphere (U15) — the style-spec root sky. | packages/core/src/model/types.ts:123 |
sky.atmosphere-blend? | number | any[] | - | packages/core/src/schemas/map.schema.ts:692 |
sky.fog-color? | string | any[] | - | packages/core/src/schemas/map.schema.ts:680 |
sky.fog-ground-blend? | number | any[] | - | packages/core/src/schemas/map.schema.ts:689 |
sky.horizon-color? | string | any[] | - | packages/core/src/schemas/map.schema.ts:677 |
sky.horizon-fog-blend? | number | any[] | - | packages/core/src/schemas/map.schema.ts:686 |
sky.sky-color? | string | any[] | - | packages/core/src/schemas/map.schema.ts:674 |
sky.sky-horizon-blend? | number | any[] | - | packages/core/src/schemas/map.schema.ts:683 |
sources | Record<string, SourceModel> | - | packages/core/src/model/types.ts:136 |
state? | Record<string, unknown> | Spec-native runtime-tunable values (state root property). Remarks Erases, because MapLibre carries it natively. The metadata a control UI needs to render a picker for these — label, type, range — does not, and lives in RuntimeHalf.parameters. | packages/core/src/model/types.ts:91 |
terrain? | object | Map-level 3D terrain (U15) — the style-spec root terrain. Remarks Style half: it compiles verbatim (class exports). Live, the renderer applies it with setTerrain because the live style is built from the basemap + addLayer, never from this model’s style object. | packages/core/src/model/types.ts:121 |
terrain.exaggeration? | number | - | packages/core/src/schemas/map.schema.ts:630 |
terrain.source | string | - | packages/core/src/schemas/map.schema.ts:626 |