Loads one layer from a caller-supplied definition, through the very path a
profile-declared layer takes.
Backs the public Layers.create() seam. There is deliberately no second
pipeline here: the definition is handed to the same per-layer processor the
profile loop uses, so it inherits the whole contract — the active: false
skip, the plugin dispatch by id, source resolution (url, dataFile,
data.dataUrl, data.vectorTiles), clustering normalisation and the load
itself. A layer created this way is therefore indistinguishable, once loaded,
from one the profile declared.
Resolution happens against the ACTIVE profile, so a relative dataFile names
the same location it would name inside that profile. With no active profile,
only definitions carrying an absolute source resolve — the others are skipped
by the processor, which logs why.
⚠️ It also REGISTERS the layer with the layer manager, exactly as the profile
loop does once its batch lands. Skipping that step is the silent half of this
path: the layer would render on the map, hold its features, and have no row —
so nothing errors and the user simply cannot toggle it. A layer created here
must be indistinguishable from a profile-declared one, and a missing row is a
difference.
Parameters
def: unknown
A layer definition, in the shape a profile's layer entry carries.
Loads one layer from a caller-supplied definition, through the very path a profile-declared layer takes.
Backs the public
Layers.create()seam. There is deliberately no second pipeline here: the definition is handed to the same per-layer processor the profile loop uses, so it inherits the whole contract — theactive: falseskip, the plugin dispatch by id, source resolution (url,dataFile,data.dataUrl,data.vectorTiles), clustering normalisation and the load itself. A layer created this way is therefore indistinguishable, once loaded, from one the profile declared.Resolution happens against the ACTIVE profile, so a relative
dataFilenames the same location it would name inside that profile. With no active profile, only definitions carrying an absolute source resolve — the others are skipped by the processor, which logs why.⚠️ It also REGISTERS the layer with the layer manager, exactly as the profile loop does once its batch lands. Skipping that step is the silent half of this path: the layer would render on the map, hold its features, and have no row — so nothing errors and the user simply cannot toggle it. A layer created here must be indistinguishable from a profile-declared one, and a missing row is a difference.