This is the documentation of version 0.63.0. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Function getKnob

    • The value a knob is at: the one set, otherwise what the module itself is at 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 where nothing gives one: 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));