On this page

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?
SDK JS
Reference
TransformConstrainFunction