dataarts / webgl-globe

WebGL Globe is a platform for visualizing latitude longitude based information using WebGL.
https://experiments.withgoogle.com/chrome/globe
Other
3.61k stars 1.16k forks source link

How to find lat long value of point in front of screen. #70

Open ximrx opened 6 years ago

ximrx commented 6 years ago

Can we find the lat long value of point in center updated on zoom/rotation?

sebosp commented 4 years ago

Probably you don't need it anymore, but for just in case, I use this:

globe_center_coords = {
    lat: (target.y * 90) / (Math.PI / 2),
    lng: ((target.x - ((Math.PI / 2) * 3)) * 180) / Math.PI
}