/** * Creates a new WorldWindow (GLSurfaceView) object. */ public WorldWindow createWorldWindow() { // Create the WorldWindow (a GLSurfaceView) which displays the globe. this.wwd = new WorldWindow(getContext()); // Setup the WorldWindow's layers. this.wwd.getLayers().addLayer(new BackgroundLayer()); this.wwd.getLayers().addLayer(new BlueMarbleLandsatLayer()); // Setup the WorldWindow's elevation coverages. this.wwd.getGlobe().getElevationModel().addCoverage(new BasicElevationCoverage()); return this.wwd; }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Establish the activity content setContentView(this.layoutResourceId); setAboutBoxTitle("About the " + this.getResources().getText(R.string.title_basic_globe)); setAboutBoxText("Demonstrates how to construct a WorldWindow with a few layers.\n" + "The globe uses the default navigation gestures: \n" + " - one-finger pan moves the camera,\n" + " - two-finger pinch-zoom adjusts the range to the look at position, \n" + " - two-finger rotate arcs the camera horizontally around the look at position,\n" + " - three-finger tilt arcs the camera vertically around the look at position."); // Create the WorldWindow (a GLSurfaceView) which displays the globe. this.wwd = new WorldWindow(this); // Add the WorldWindow view object to the layout that was reserved for the globe. FrameLayout globeLayout = (FrameLayout) findViewById(R.id.globe); globeLayout.addView(this.wwd); // Setup the WorldWindow's layers. this.wwd.getLayers().addLayer(new BackgroundLayer()); this.wwd.getLayers().addLayer(new BlueMarbleLandsatLayer()); this.wwd.getLayers().addLayer(new AtmosphereLayer()); // Setup the WorldWindow's elevation coverages. this.wwd.getGlobe().getElevationModel().addCoverage(new BasicElevationCoverage()); }