Function: resolveSpecFromMapType()
resolveSpecFromMapType(
spec):VisualizationSpec
Defined in: spec/mapTypeDefaults.ts:282
Resolves a spec with mapType into a full VisualizationSpec
by auto-generating layers, legends, and mapData defaults.
Returns the spec unchanged if no mapType is set.
This is a pure function (no React hooks, no side effects). The runtime and
GeoVisProvider call it before validating, so rendering needs no manual
call. Call it yourself to validate or inspect what will actually render —
the generated layers, the chosen source, the merged legends — before the
spec reaches a browser:
const result = validateSpec(resolveSpecFromMapType(spec), capabilities);
The result carries an internal __resolved marker, so passing it on to
GeoVisProvider is safe: it is not expanded twice.
Parameters
| Parameter | Type |
|---|---|
spec | VisualizationSpec |