Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
SpinnyGlobes for everyone; lightweight, zoomable, tiled, iphone, flash, native, meedan, banff centre, makerlab
C++ ActionScript JavaScript Objective-C C
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


// History
// ------------------------------------------------------------
// Rev 3 April 12 2010
// ------------------------------------------------------------
// - moved it to shell compilation
// - small tidyups
// ------------------------------------------------------------
// Rev 2 June 11 2009
// ------------------------------------------------------------
// There still is not a good free globe other than this... so I kicked it forward a notch including:
//   * moving it to flex builder
//   * fixing cross domain tiles
//   * making it addressable from javascript
//   * a number of small cosmetic cleanups
// ------------------------------------------------------------
// Rev 1 September 1 2008
// ------------------------------------------------------------
// Spinny Globe App
// Open Source / Free / Public Domain
// By Anselm Hook, Michael Gaio, Alain Bloch, Matthew Stadler, Stephanie Snyder, Paige Saez and others
// This work was funded by Meedan and Call2Action and MakerLab - thanks so much we love ya!
// The hope is to provide a 'good enough' minimalist 3d zoomable globe in flash that others can build on.
// Many people have written proprietary flash globes and the hope here is to reduce that duplicate effort.
// In general I've tried to generate the globe surface as a single polygon mesh to avoid slivers.
// The poles are not well dealt with and I avoid those cases by limiting the camera pan and zoom for now.
// In general there should be a 'pole cap' applied or a different rendering algorithm for the poles.
// The application also loads in XML content with markers and pop-up dialogs.  Line drawing is supported.
// There will hopefully be ongoing incremental improvements - see
//   - anselm sep 1 2008
// --------------------------------------------------------
// Rev 0 Notes...
// --------------------------------------------------------
// Bugs:
//  * polygons are not rendering in certain cases at zoom of 1 - this must be some kind of boundary failure. fixed.
//  * polar caps and slivers
//		* draw white or skip.
//		- a filler polar cap must be drawn? doesn't seem critical yet.
//		- i can still get slivers anyway; circumvented for now but should we unfold as we zoom or render more data?
//		- should we not be so aggressive about only rendering a 3 x 3 ?  if we allowed more (if cached) it may help
//	* remove arcball or apply constraint lock; fixed.
//	* navigation jumps at some zooms; this turns out to be an event handling bug in flash; fixed.
//	* button controls need to scale and a reset would be nice.  fixed.
//  * when you drag outside the screen and let go of the mouse it think the mouse is still down. fixed.
//  * the size of the globe has to be carefully chosen to avoid showing incomplete slivers. fixed.
//  * on a reset the manipulator zoom was not reset so it would drag at the wrong speed. fixed.
//	* draw lines
//	* draw map markers, map popups, load map data
//  * draw a logo
//	* the logo leads to an url that leads to the makerlab site
//  * click on a dot to close little dialog window as well as open it
//  * tie into georss
//	* cannot repeat zoom when you double click again and zoom again
//  * the description is not showing up in georss
//  x decluttering
//		* different zoom levels for data
//  ~ street level data
//  x make pop mode conditional
//  * start over portland oregon
//	- improve line elevation in some cases and think about crossing prime meridian
//	- double buffer by drawing two globes and switching after entirety has loaded
//  - motion momentum
//	- an animation sequencing engine for storytelling
//  - compile with flex to let more people participate in coding
//	- remoting for map data is failing - why???
//  - don't open a new window but try use the same window... this is a problem with an iframe
//  - double clicking is failing
//	- a way to toggle between popup and hover information
//	- the info is not revising the same window but instead is opening a new one... bad.
//  - server side map data generation strategy
//	    * mapnik builds
//	    - draw map data from open street maps using mapnik as a wms?
//	    - draw base data from mapserver
//	    - draw data behind tilecache
//  - server side unix issues on
//		- boost won't build so mapnik wont built and mapnik cannot find built in boost
//		- gdal 1.5 won't build due to weird error so bigtiff won't build - so mapserver too - a problem?
//		- could try all on meedan hardware i guess?
// -----------------------------------
// -----------------------------------

Spinny Globes for flash, the iphone and native platforms. Similar in theme to NASA WorldWind? and Google Earth.

A 3d globe with wms tile support and arc-ball based rotation.

There are three targets for this source code 1) flash 2) opengl 3) iphone native app.

1) Flash is a challenging target. Historically it has been somewhat difficult to show a 3d globe in the browser let alone anything in 3d; solutions such as java applets are not universally supported, and flash itself although well supported has had no 3d support. Papervision3d is a lightweight pure source code flash component that we leverage to make it possible to easily deliver a 3d globe in the browser. This is hopefully a foundation for variety of projects, and being open source it can hopefully be improved by the community.

Here is a running example of an earlier rev of the flash version of this code: 

And my home page has it too currently: 

And so does Suddenly (whom I made it for for fun): 

And a more recent version: 

2) The OpenGL version is quite simple and a good development reference point although of course not competitive with NASA WorldWind? or Google Earth. There is a sample port of the same code to cygwin under windows under opengl as well in /opengl .

3) The iPhone version is more preliminary - the hope is to improve it with community support. I've built an installer so you can install it via community sources like any app. To do this you first crack your phone ( then goto your installer, and goto sources within that, and then add a new source - that new source will be When typing in the iphone ui it will try to capitalize iPhone.XML - reject that suggestion. Now you will have the globe as a source. Goto your installer main menu. Goto Multimedia. Goto Globe. Install that. Now it will appear as an icon on your iphone desktop. Congradulations. All you can do right now is rotate it. It does not fetch textures dynamically. The sun position is static right now. Please feel free to help out. For the source code see /iphone. This runs on the OpenGLES profile. An executable is included.

Here is a screen-shot of the iphone opengl native version: 

This is a volunteer open source effort with support provided by Meedan and Call2Action?.

Something went wrong with that request. Please try again.