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

    Type Alias GeoBias

    GeoBias:
        | PointGeoBias & { boundingBox?: never }
        | BoundingBoxGeoBias & { position?: never; radiusMeters?: never }

    Where to look: a point with an optional radius, or a bounding box — one or the other.

    The two cannot be combined, which is why they are a union rather than separate options: an endpoint applies exactly one geographic bias per request.

    // Around a point, ranking bias only
    const nearAmsterdam: GeoBias = { position: [4.9, 52.3] };

    // Around a point, confined to 2 km
    const within2km: GeoBias = { position: [4.9, 52.3], radiusMeters: 2000 };

    // Inside the visible map area
    const inViewport: GeoBias = { boundingBox: map.getBounds().toArray().flat() as BBox };