Polygon Globe

Polygon Globe takes the flat image maps and cuts them into small triangles to create an interactive three dimensional globe.
Building a PolygonGlobe also requires the following Mapquest API library files:

Sample Code:
     var globe:PolygonGlobe = new PolygonGlobe();
     globe.rotateFlatMap = false;
     globe.gravitateUpright = true;
     globe.smoothing = false;
     globe.trianglesPerRadius = 10;
     globe.showShading = true;

     this.map.projection = globe;

The table below goes over the properties associated with the PolygonGlobe object

Property Description Example
rotateFlatMap The three dimensional globe only effects the top 2 zoom levels. Since the globe can be rotated on any axis, this property determines if the flat maps will be rotated (possibly upside down) when the user transitions between the globe and the standard maps.
globe.rotateFlatMap = false;
gravitateUpright When interacting with the globe, its ideal for the user to be able to rotate on any axis for the most intuitive mouse interaction. However this means that the globe can get into some interesting positions (completely upside down). To counter this you can set this property to true and after the user adjusts the globe it will rotate upright while maintaining its center point.
globe.gravitateUpright = true;
smoothing The flat projected images of the maps need to be stretched and scewed to present a three dimensional globe. This property determines if the images are smoothed/antialiased as these distortions occur. While it can improve the appearance of the globe it can be very processor intensive.
globe.smoothing = false;
trianglesPerRadius This property determines how many triangles will make up the three dimensional globe. Because the triangles must make up a full sphere this number must be an even number. The more triangles the smoother the globe shape. The less triangles the more 'blocky' it will appear. Having too many triangles can be very processor intensive.
globe.trianglesPerRadius = 10;
showShading This property will add a gradient shadow around the edge of the globe and can greatly improve the three dimensional appearance of the globe. It will take its coloring from the TileMaps background color.
globe.showShading = true;