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

    Function sectionDrawsByDefault

    • Whether the given type draws itself when sections says nothing about it.

      Parameters

      Returns boolean

      The answer a panel of section controls needs to show which switches start on. Asking the map instead cannot answer it: a type draws no layer for a route carrying none of its sections, so an absent layer reads the same as a type switched off.

      const [drawn, optIn] = partition(drawnSectionTypes, sectionDrawsByDefault);