Skip to main content

Module style_json

Module style_json 

Source
Expand description

JSON style-spec parsing and resolution for the style runtime.

This module adds a declarative style-document layer closer to MapLibre’s style/style.ts: JSON source and layer definitions are parsed into a lightweight spec and then resolved through a host-provided runtime source registry into an executable StyleDocument.

Structs§

StyleSourceRegistry
Runtime source registry used while resolving JSON specs.
StyleSpecDocument
Declarative JSON style document.
StyleSpecLayer
Declarative layer entry.
StyleSpecLight
A single light entry in the style-spec "lights" array.
StyleSpecLightProperties
Unioned property bag for all light types.
StyleSpecProjection
Top-level projection entry in a JSON style spec.
StyleSpecSky
Top-level "sky" configuration in the style-spec.
StyleSpecSource
Declarative source entry.
StyleSpecTerrain
Top-level terrain entry in a JSON style spec.
StyleSpecTransition
Transition timing as declared in a JSON style spec.

Enums§

StyleSpecError
Errors produced while parsing or resolving a JSON style specification.
StyleSpecLayerType
Layer kinds accepted by the JSON style spec.
StyleSpecLightType
Light type discriminant.
StyleSpecProjectionType
Projection kinds accepted by the current JSON style spec.
StyleSpecSourceType
Source kinds accepted by the JSON style spec.

Functions§

parse_style_json
Parse a JSON style string.