Click and find Latitudes & Longitudes

Click and find Latitudes & Longitudes

the link:

This code was inspired by and heavily based on @prisoner849 ´s special work "Sphere of separate quads … Sphere of separate quads.

There I found a way to click on a point on the Earth, get the coordinates of the point, and transform them into latitude and longitude.

In the code You will find some interesting URL´s to find references.

Three.js Forever !!!


Here is a challenge for you:

Try to do the same without any trigonometry and without quads.

Hi @PavelBoytchev

Thanks for the ear tugging…

I just discovered the ‘.point’ property of raycasting !!!

So, I do not need quads…

Now I will try to find how to not use trigonometry to convert x y and z to latitude and longitude.

Thank You very much for the attention!

PS1: My first thought was to use RFIDs, but I found it too expensive! :smiley:
PS2: Maybe I need an Educator for the next step! :laughing:
PS3: Please see the link:
Please observe the differences between latitudes in p and in pp.
pp is done with
let pp=Earth.worldToLocal(pdinho);
referred to @Mugen87 Get ThreeJS coordinates of mesh intersection directly below mouse click - #3 by Welch_Synthetik
Of course I had to do some adjusts in the equations to calculate trigonometric functions.
PS4: IMPORTANT… made corrections in North and South Signs (+ and -) according the errors obsevations made by @PavelBoytchev … and Thanks for that! :wink:

1 Like