Skip to content

LayerModel

Defined in: packages/core/src/model/types.ts:71

A layer, split the same way.

runtime carries the properties a cartographer thinks of as belonging to the layer — its legend entry, its label, whether it can be toggled, what happens on click — none of which the style spec can express. Keeping them beside the layer rather than addressed by id from a separate block is decision V2-D1; the emitter drops the whole runtime subtree by one rule at any depth.

PropertyTypeDescriptionDefined in
runtimeRecord<string, unknown>Interactions, legend entry, label, toggle state, initial visibility.packages/core/src/model/types.ts:75
specRecord<string, unknown>Keys MapLibre understands, including id, type, paint, filter.packages/core/src/model/types.ts:73