earth iphone app

hi, ive been doing a bit of work over the last week making an earth iphone app.
its basically a sphere with a earth texture wrapped around it… i found it very tricky finding decent resources on this topic on the web so thought id post to save time for anyone planning to do something like this.

the example contains a Trackball class for intuitive rotatation of the earth, a CurveHop class which draws a curved ribbon from location to location as it hops along on the surface of the earth and correct latitude and longitude mapping onto the sphere.

download the source here,

be awesome to hear suggestions and additions to the code if anyone takes it further.


1 Like

oh - wow - thanks for sharing!
It runs great on my iPod Touch.

Thats really handy!

that is ace!

Hi Julapy,

I’ve taken the liberty of compiling a non-iphone version of this (for windows/codeblocks). I just disabled the multitouch calls, and set the globe to be moved by the mouse.

the one thing I had to change was adding


to the beginning of setup(). Maybe this doesn’t matter on an Iphone, but its needed on a pc.

thanks so much for this!



i had to dig this code out again for a project…
so i cleaned it up quite a bit and updated so it works with OF 007.

note: this new source code has not been tested on iOS but should work.


thanks julapy for the update! works great as I have been looking for a good lat/long to globe example