This is the documentation of version 1.0.0-rc.4. 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

      A panel of section controls needs this answer to show which switches start on. The map can't 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);