TomTom Maps for JavaScript
    Preparing search index...

    Variable getViewportBiasConst

    getViewportBias: (map: BaseMapState, minZoom?: number) => Position | undefined

    Returns the map centre, to favour search results in view. Pass it as { position } to a service's geoBias or to locatePlace's bias. Below minZoom, the view is too wide to say where the user means.

    Type Declaration

      • (map: BaseMapState, minZoom?: number): Position | undefined
      • Parameters

        • map: BaseMapState

          The agent's base-map slice, state.baseMap in a tool's execute.

        • OptionalminZoom: number

        Returns Position | undefined

        The centre as [longitude, latitude], or undefined below minZoom.