[Bug] `bearing` not supported for controlled components
Description
According to docs,
When Map is used as a controlled component, event.viewState.bearing reflects the zoom that the camera "proposes" to change to, as a result of either user interaction or methods such as flyTo. The camera does not actually change until the application updates the bearing prop.
In reality, event.viewState.bearing reports the current bearing.
Expected Behavior
event.viewState.bearing from onRotate should return "proposed" bearing
Steps to Reproduce
https://codesandbox.io/s/exciting-currying-fv7z84?file=/src/App.js
Attempt to rotate, see console
Environment
See codesandbox
Logs
No response
What exactly is the bug here? The map in your app can be rotated, which shows that onRotate is called with the next bearing value.
https://github.com/visgl/react-map-gl/assets/42340374/742718ad-e98d-4454-b305-8deb4489e8c8
@Pessimistress do you mind clarifying please? I can adjust pitch but rotate(bearing) is non functional in that app.
I see, you are dragging the navigation control, not using ctrl+pan. I will look into it.