/** * Constructs a Blue Marble background layer with the built-in WorldWind library resource * res/drawable/gov_nasa_worldwind_worldtopobathy2004053. The resource must be accessible from the Android Context * associated with the WorldWindow. */ public BackgroundLayer() { this(ImageSource.fromResource(R.drawable.gov_nasa_worldwind_worldtopobathy2004053), new ImageOptions(WorldWind.RGB_565)); }
public AtmosphereLayer() { this.setDisplayName("Atmosphere"); this.setPickEnabled(false); this.nightImageSource = ImageSource.fromResource(R.drawable.dnb_land_ocean_ice_2012); this.nightImageOptions = new ImageOptions(WorldWind.RGB_565); }
/** * Constructs a Blue Marble image layer with the WMS at a specified address. * * @param serviceAddress a URL string specifying the WMS address * * @throws IllegalArgumentException If the service address is null */ public BlueMarbleLayer(String serviceAddress) { if (serviceAddress == null) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "BlueMarbleLayer", "constructor", "missingServiceAddress")); } WmsLayerConfig config = new WmsLayerConfig(); config.serviceAddress = serviceAddress; config.wmsVersion = "1.3.0"; config.layerNames = "BlueMarble-200405"; config.coordinateSystem = "EPSG:4326"; config.transparent = false; // the BlueMarble layer is opaque this.setDisplayName("Blue Marble"); this.setConfiguration(new Sector().setFullSphere(), 500, config); // 500m resolution on Earth TiledSurfaceImage surfaceImage = (TiledSurfaceImage) this.getRenderable(0); surfaceImage.setImageOptions(new ImageOptions(WorldWind.RGB_565)); // exploit opaque imagery to reduce memory usage } }
surfaceImage.setLevelSet(new LevelSet(levelsConfig)); surfaceImage.setTileFactory(this); surfaceImage.setImageOptions(new ImageOptions(WorldWind.RGB_565)); // reduce memory usage by using a 16-bit configuration with no alpha this.addRenderable(surfaceImage);