mirror of
https://github.com/NASAWorldWind/WebWorldWind.git
synced 2025-12-08 19:46:18 +00:00
45 lines
1.8 KiB
JavaScript
45 lines
1.8 KiB
JavaScript
/*
|
|
* Copyright (C) 2014 United States Government as represented by the Administrator of the
|
|
* National Aeronautics and Space Administration. All Rights Reserved.
|
|
*/
|
|
/**
|
|
* Illustrates the World Wind configuration options and how to set them. In order to have an effect, most configuration
|
|
* options must be set before creating a World Window or any other World Wind object.
|
|
*
|
|
* @version $Id: Configuration.js 3320 2015-07-15 20:53:05Z dcollins $
|
|
*/
|
|
|
|
requirejs(['../src/WorldWind',
|
|
'./LayerManager'],
|
|
function (ww,
|
|
LayerManager) {
|
|
"use strict";
|
|
|
|
// Configure the logging level.
|
|
WorldWind.Logger.setLoggingLevel(WorldWind.Logger.LEVEL_WARNING);
|
|
|
|
// Configure the amount of GPU memory to use.
|
|
WorldWind.configuration.gpuCacheSize = 500e6; // 500 MB
|
|
|
|
// Create a World Window and some layers to display.
|
|
var wwd = new WorldWind.WorldWindow("canvasOne");
|
|
|
|
var layers = [
|
|
{layer: new WorldWind.BMNGLayer(), enabled: true},
|
|
{layer: new WorldWind.BMNGLandsatLayer(), enabled: false},
|
|
{layer: new WorldWind.BingAerialWithLabelsLayer(null), enabled: true},
|
|
{layer: new WorldWind.BingRoadsLayer(null), enabled: false},
|
|
{layer: new WorldWind.OpenStreetMapImageLayer(null), enabled: false},
|
|
{layer: new WorldWind.CompassLayer(), enabled: true},
|
|
{layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true},
|
|
{layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}
|
|
];
|
|
|
|
for (var l = 0; l < layers.length; l++) {
|
|
layers[l].layer.enabled = layers[l].enabled;
|
|
wwd.addLayer(layers[l].layer);
|
|
}
|
|
|
|
// Create a layer manager for controlling layer visibility.
|
|
var layerManger = new LayerManager(wwd);
|
|
}); |