Solved! Go to Solution.
Thank you for your response. When will WAB 2D apps be available in API 4.0?
How would I incorporate the code into my app, or will the 2D compass become a widget when WAB moves to API 4.0?
It's not difficult to implement such a widget if 2D apps are based on API 4.x. Unfortunately the timeline of this upgrade is not clear yet.
If you'd like to write your own widget by using 3.x API, you might need to deal with the map rotation by performing CSS3 transformations on your map.