Join us online - 19th of November
Save your spot
For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Type Alias TransformConstrainFunction

TransformConstrainFunction: (
    lngLat: LngLat,
    zoom: number,
) => { center: LngLat; zoom: number }

The callback defining how the transform constrains the viewport's lnglat and zoom to respect the longitude and latitude bounds.

Type Declaration

    • (lngLat: LngLat, zoom: number): { center: LngLat; zoom: number }
    • Parameters

      Returns { center: LngLat; zoom: number }

Was this helpful?