The MapKit is terrific, and 2D maps definitely have their place, but there are definitely times when a 3D globe not only looks better, but can provide a better experience for your users.
The developer of an open source interactive 3D globe library sent me a tip about his library.
It is really tough for me to describe the potential for this library so here’s a video showing an built using the library in a 2-day hackathon which you can download from the project’s repository:
You can actually download this example app in the app store (iPad only).
As you can see from the video something great about this library is not only the globe, but the fact that you can draw shapes and text right onto the globe.
The library is Whirly Globe and you can find it’s Google Code page here:
http://code.google.com/p/whirlyglobe/
When you check it out from SVN make sure that you also get the iOSDevCamp11 branch if you want to get the example shown within the video.
Building The Examples
It took a little while to get the sample projects building, but the result is terrific.
The build process for this library is a little more difficult than with most of the other libraries I’ve mentioned on this site. This is due to the usage of a couple of C++ libraries that are not included within the SVN checkout.
When you check out the files from the repository there is a readme, but I had some difficulty because of the different versions available for the libraries.
At the very least you will need Eigen 2.0.15 (Eigen 2.0.16 should work – but for some reason it did not) and C++ Boost – I used Boost version 1.0.47
For the cooler WhirlyGraph demo in the video you’ll also need to include Clipper.
Also mentioned within the documentation is shapelip-1.30b2, but I believe that’s only used if you decide to build the libraries from source – I just used the precompiled library files.
You will need to make sure that you set the directories properly by pointing the header search paths in the build settings to the right place .
The examples should run at this stage, and you’ll get to see first hand the amazing potential of this library.
©2011 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.
.