Skip to content

Instantly share code, notes, and snippets.

@mousebird
Created September 12, 2013 20:32
Show Gist options
  • Save mousebird/6543326 to your computer and use it in GitHub Desktop.
Save mousebird/6543326 to your computer and use it in GitHub Desktop.
// For elevation mode, we need to do some other stuff
if (startupMapType == MaplyGlobeWithElevation)
{
// Tilt, so we can see it
if (globeViewC)
[globeViewC setTiltMinHeight:0.001 maxHeight:0.04 minTilt:1.21771169 maxTilt:0.0];
globeViewC.frameInterval = 2; // 30fps
// An elevation source. This one just makes up sine waves to get some data in there
elevSource = [[MaplyElevationDatabase alloc] initWithName:@"world_web_mercator"];
zoomLimit = elevSource.maxZoom;
requireElev = true;
baseViewC.elevDelegate = elevSource;
// Don't forget to turn on the z buffer permanently
[baseViewC setHints:@{kMaplyRenderHintZBuffer: @(YES)}];
// Turn off most of the options for globe mode
configViewC.allOptions = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment