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.




    
JavaScript Maps API

Examples