mapbox-gl-js version:
0.21.0
JSBin Link: http://jsbin.com/kakesehole/edit?html,output
Use map.setCenter, passing an array of [long, lat] like specified.
The map is centered on your given long, lat.
The map is centered on the given longitude, but the latitude is 0.
When you call setCenter([0, 50]), the map is at zoom level 0, at which point the range of possible center latitudes is constrained by the height of the viewport. If you switch the order of calls such that the zoom is set to 5 first, it will work as you expect.
@jfirebaugh this should be documented. I wasted a day debugging the issue
Most helpful comment
When you call
setCenter([0, 50]), the map is at zoom level 0, at which point the range of possible center latitudes is constrained by the height of the viewport. If you switch the order of calls such that the zoom is set to 5 first, it will work as you expect.