Sets one knob of a module by its catalogue id: checks the value with validateKnobValue, then applies the module's configuration with the value at the knob's path and every other setting kept.
The module's knob catalogue, e.g. trafficFlowKnobCatalogue for a TrafficFlowModule.
trafficFlowKnobCatalogue
TrafficFlowModule
The knob's id, its path in the module's configuration.
Nothing changes when the value is invalid. StylingModule sets its knobs with its own set.
StylingModule
set
RangeError for a value the knob does not take; Error for an id the catalogue lacks.
RangeError
Error
setKnob(trafficFlow, trafficFlowKnobCatalogue, 'filters.any.0.roadCategories.show', 'only');setKnob(analytics, trafficAreaAnalyticsKnobCatalogue, 'metricConfig.speed.height.maxHeightMeters', 2000); Copy
setKnob(trafficFlow, trafficFlowKnobCatalogue, 'filters.any.0.roadCategories.show', 'only');setKnob(analytics, trafficAreaAnalyticsKnobCatalogue, 'metricConfig.speed.height.maxHeightMeters', 2000);
Sets one knob of a module by its catalogue id: checks the value with validateKnobValue, then applies the module's configuration with the value at the knob's path and every other setting kept.