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

    Function sectionSupportsKnob

    • Whether the given type answers to the given knob.

      Parameters

      Returns boolean

      What a panel of section controls asks to decide which controls to render — the type system says the same thing through SectionKnobOf, but only a value can be looped over.

      for (const knobName of ['color', 'opacity', 'pattern'] as const) {
      if (sectionSupportsKnob(type, knobName)) renderControl(type, knobName);
      }