I'm working on a mapping application that imports latitude and longitude data
and plots it onto a 3D globe. Does anyone have experience with this? I'm not
sure what the best solution to my problem is.
You can see and download the code base from the open-source project here:
http://code.google.com/p/meadanglobe/
I'm successfully plotting points onto the 3D surface of the globe, yet the
translation of latitude and longitude does not seem accurate in more than one
respect: 1) not oriented relative to the image of the globe, and 2) each node
is not positioning correctly relative to each other (for example "Rome" and
"Johannesburg" are right next to each other--when they should be thousands of
miles apart!)
I am using very standard translation method which I found here:
http://board.flashkit.com/board/archive/index.php/t-666832.html/
Here is the code:
xPos = app.radius * Math.cos(longitude) * Math.cos(latitude);
yPos = app.radius * Math.sin(longitude) * Math.cos(latitude);
zPos = app.radius * Math.sin(latitude);
miquael - 20 Mar 2008 23:07 GMT
Here's a link to the resource again (for some reason the one above does not direct properly):
http://board.flashkit.com/board/showthread.php?t=666832