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

    Variable getViewportBiasConst

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

    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 spans too wide an area 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.