'map.fitbounds giving wrong results when bearing is changed

mapbox-gl-js version: 2.7.0 / all other versions

browser: Chrome/Safari

Steps to Trigger Behavior View the jsfiddle (add your own accessToken): https://jsfiddle.net/6fk7up9x/16

Expected Behavior The markers should be visible at all times(when changing bearing), the map should fit the boundary box depending on the two coordinates that i provided and the provided bearing.

Expected behavior

Actual Behavior When changing bearing above 180 or under 100, the markers are not visible anymore.

Actual behavior



Solution 1:[1]

This has been fixed in version 2.8.0. See this GitHub Pull Request

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tanner Perrien