Skip to main content

Module style

Module style 

Source
Expand description

Style/runtime model for style-document-driven map construction.

This module provides a small engine-owned style runtime inspired by MapLibre’s style system. It covers Rustial’s current source families and a broader style-layer taxonomy, while lowering geometry-centric layers onto the existing engine primitives (BackgroundLayer, HillshadeLayer, TileLayer, VectorLayer, and ModelLayer).

Structs§

AmbientLight
Ambient light parameters.
BackgroundStyleLayer
Background layer style spec.
CanvasSource
Canvas source — georeferenced dynamic overlay driven by a FrameProvider.
CircleStyleLayer
Circle layer style spec.
ComputedFog
Pre-computed fog parameters ready for GPU uniform upload.
ComputedLighting
Pre-computed lighting parameters ready for GPU uniform upload.
ComputedShadow
Pre-computed shadow parameters for the current frame.
ComputedSky
Pre-computed sky parameters ready for GPU uniform upload.
DirectionalLight
Directional (sun) light parameters.
FillExtrusionStyleLayer
Fill extrusion layer style spec.
FillStyleLayer
Fill layer style spec.
FogConfig
User-facing fog/atmosphere configuration.
GeoJsonSource
In-memory vector feature source with optional point clustering.
HeatmapStyleLayer
Heatmap layer style spec.
HillshadeStyleLayer
Hillshade layer style spec.
ImageSource
Image source lowered onto raster rendering.
LayerTransitionState
Per-layer transition state for all transitionable paint properties.
LightConfig
Top-level lighting configuration.
LineStyleLayer
Line layer style spec.
MapStyle
Mutable runtime wrapper around a StyleDocument.
ModelSource
In-memory model source.
ModelStyleLayer
Model layer style spec.
RasterSource
Raster tile source entry.
RasterStyleLayer
Raster/tile layer style spec.
ResolvedTransitions
Snapshot of all resolved transition values for a single layer.
ShadowConfig
Shadow map configuration parameters.
SkyConfig
User-facing sky / atmosphere configuration.
StyleDocument
A style document containing source registry, ordered layers, and optional terrain source.
StyleEvalContext
Runtime evaluation context for paint/layout values.
StyleEvalContextFull
Extended evaluation context that carries per-feature mutable state alongside the current zoom level.
StyleLayerMeta
Shared style-layer metadata.
SymbolStyleLayer
Symbol layer style spec.
TerrainSource
Terrain source entry.
TransitionSpec
Transition timing specification.
Transitioning
A single property undergoing a timed transition.
VectorStyleLayer
Legacy generic vector style spec.
VectorTileSource
Vector-tile-like feature source.
VideoSource
Video source — georeferenced dynamic overlay driven by a FrameProvider.

Enums§

LightingMode
Lighting mode controlling how lit shaders compute surface illumination.
SkyType
Rendering mode for the sky background.
StyleError
Style/runtime errors.
StyleLayer
Supported style-layer variants.
StyleProjection
Top-level style-owned projection selection.
StyleSource
Source registry entry.
StyleSourceKind
Enumerates style/runtime source families.

Traits§

FromFeatureStateProperty
Conversion from a PropertyValue stored in feature-state to a concrete style value type.
StyleInterpolatable
Interpolation behaviour for style values.

Functions§

atmospheric_clear_color
Blend base toward a slightly lifted “horizon” colour as pitch increases past 0.25 rad.
circle_style_with_state
Resolve a CircleStyleLayer’s paint properties with per-feature state.
compute_fog
Compute fog parameters from camera state and optional user config.
compute_lighting
Compute GPU-ready lighting parameters from the user config.
compute_shadow_cascades
Compute cascade light-space matrices from the camera frustum and light direction.
compute_sky
Compute GPU-ready sky parameters from the user config.
fill_extrusion_style_with_state
Resolve a FillExtrusionStyleLayer’s paint properties with per-feature state.
fill_style_with_state
Resolve a FillStyleLayer’s paint properties with per-feature state.
heatmap_style_with_state
Resolve a HeatmapStyleLayer’s paint properties with per-feature state.
line_style_with_state
Resolve a LineStyleLayer’s paint properties with per-feature state.
symbol_style_with_state
Resolve a SymbolStyleLayer’s paint properties with per-feature state.
vector_style_with_state
Resolve a VectorStyleLayer’s paint properties with per-feature state.

Type Aliases§

RasterSourceFactory
Factory for constructing a fresh raster tile source when a style document is applied.
StyleLayerId
A style layer identifier.
StyleSourceId
A style source identifier.
StyleValue
Type alias for backward compatibility.
TerrainSourceFactory
Factory for constructing a fresh terrain elevation source when a style document is applied.
VectorTileSourceFactory
Factory for constructing a fresh streamed vector tile source when a style document is applied.