FitBounds wrongly warns "cannot fit" and not works.
mapbox-gl-js version: 0.34.0 Browser: Chrome. Mac OSX. (not sure about other browsers)
Steps to Trigger Behavior
- https://jsfiddle.net/bewithjonam/4sb4ycb0/1/
- Click on the "Not Working" button
Expected Behavior
1.) The map should pan and fit to the given bounds.
Actual Behavior
1.) The map is not panning or zooming to the bounds.
map.fitBounds([[-122.33,37.90],[-122.33,37.91]]) SMALL bounds is WORKING.
map.fitBounds([[-122.23,37.84],[-122.33,37.91]]) Comparatively a little BIGGER bounds is NOT WORKING. It is warning once "Map cannot fit within canvas with the given bounds, padding, and/or offset."
Your coordinates in the "not working" example are not correctly ordered. If you do [[-122.33,37.84],[-122.23,37.91]], it works correctly. So closing as working as intended.
bewithjonam How did you calculate the coordinates to get the exact area in view?