vasturiano / globe.gl

UI component for Globe Data Visualization using ThreeJS/WebGL
https://vasturiano.github.io/globe.gl/example/world-population/
MIT License
1.97k stars 293 forks source link

How to make globe specific lat&lng to face to camera? #115

Closed KevinZhang19870314 closed 1 year ago

KevinZhang19870314 commented 1 year ago

Hi, is there anyway I can rotate globe to specific angle, then to make specific lat&lng to face to camera? I know we can use Globe.rotateX, Globe.rotateY to spefici angel, but given lat&lng, how to calculate the angel? Also the globe is autoRotate set to true.

vasturiano commented 1 year ago

@KevinZhang19870314 please see pointOfView({ lat, lng, altitude }, [ms]) on the Render controls.

KevinZhang19870314 commented 1 year ago

Thank you @vasturiano ! That works.