Fit to the bounds of a lineString
Get the bounds of a LineString by passing its first coordinates to LngLatBounds
and chaining extend
to include the last coordinates.
Related examples
An extension of MapLibre GL JS
Get the bounds of a LineString by passing its first coordinates to LngLatBounds
and chaining extend
to include the last coordinates.