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

      • This is useful to offset the map center in a way that it looks harmonious with surrounding UI components.
      • It's equivalent to the center of calculatePaddedBBox.