TransWikia.com

Getting north in Cesium for billboard

Geographic Information Systems Asked on November 12, 2021

I have two maps, a 3D and a 2D Map in my app, The user can move both camera, but the current position and rotation of the 3D camera must be reflected in the 2D map (see Screenshot)

enter image description here

I made it draw on the 2D map using a billboard, and rotate using the rotation property and assigning to it the heading of the camera :

{
      image: 'assets/images/entity/camera.png',
      position: this.camera.position,
      rotation: this.camera.heading,
      id: this.id
 }

but it appear that depending on the place of the globe, the rotation as to be different. For example in the above example I have to do:

-this.camera.heading + 90

but in other place of the world, the calculation is different.

How can I make a formula that makes it match everywhere around the globe ?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP