I'm new in cesium, and I have some questions:
1. Is there a way in cesium that I can calibrate the map to the north. In google earth there is a compass that shows when I rotate the globe where am I relative to the north, and I can press "N" to get back to the north. I want to have the same ability in cesium to get back to the north, and also to do a compass widget. Do you know which methods I can use in cesium to handle it. Or is there a plug-in that had implemented something like that?
2. I want to show vectors on the map, that their inside will be clear and only the frame will be with color. I saw that the inside is handled by the Material class, but I hadn't found yet a handle for stroke color.
I saw on the DrawHelper plug-in that there is a setStrokeStyle function, but it has some bugs, the width doesn't work, and it disables the editing mode of the shape.
3. In the draw-helper plug-in I saw that editing existing shape, works well with the 3D scene mode, but in the 2D mode when I try to edit the shape by dragging the corner with the mouse, the map is moving too. Is there a way to solve this problem?
I calculate heading projecting vectors onto planes and measuring the angle between the projected vectors, but I’ve been using my own math library to do this so far. My method might not super-accurate for non-spherical ellipsoids, however.
Looking at function getHeading3D(camera) in Camera.js it seems that first it obtains a reference frame for the location of the camera on the ellipsoid. I believe that eastNorthUpToFixedFrame means +x is east, +y is north, +z is away from planet center for the given location. It seems to place the camera.right vector into this new coordinate system, then gets the angle it is pointing to within the XY plane using atan2. In Mathematics east/right/+x is 0 angle.
Knowing your current heading you then know how much to rotate to get to your desired heading.