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

    Function calculatePaddedCenter

    • Calculates the center point in lng-lat coordinates of the visible map area that does not overlap with the given UI HTML elements.

      Parameters

      Returns Position | null

      The center as [lng, lat], or null if the visible area is too small

      Use it to offset the map center so it looks harmonious with surrounding UI components. It is equivalent to the center of calculatePaddedBBox.