TomTom Maps for JavaScript
    Preparing search index...

    Function getKnob

    • Returns the value set for a knob, otherwise the module's own value where it knows it (StylingFoundationsModule reads the loaded style), otherwise the catalogue's default.

      Type Parameters

      • CONFIG
      • ID extends string
      • KNOB extends string

      Parameters

      • module: KnobTarget<CONFIG>

        A map module, or a plugin with knobs, such as MapEffects.

      • catalogue: readonly KnobEntry<ID>[]

        Its knob catalogue.

      • id: KNOB

        The knob's id.

      Returns KnobOutput<CONFIG, KNOB>

      The value, or undefined for a knob with no default or a style value that is a data-driven expression.

      Error for an id the catalogue lacks.

      for (const knob of stylingFoundationsKnobCatalogue) console.log(knob.id, getKnob(styling, stylingFoundationsKnobCatalogue, knob.id));