diff --git a/examples/Annotations.js b/examples/Annotations.js index a48b4ffa7..b2a179e0c 100644 --- a/examples/Annotations.js +++ b/examples/Annotations.js @@ -50,7 +50,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/BasicExample.js b/examples/BasicExample.js index d4f2df7f2..81474d470 100644 --- a/examples/BasicExample.js +++ b/examples/BasicExample.js @@ -54,7 +54,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/BlueMarbleTimeSeries.js b/examples/BlueMarbleTimeSeries.js index f55715561..d653e5d4f 100644 --- a/examples/BlueMarbleTimeSeries.js +++ b/examples/BlueMarbleTimeSeries.js @@ -45,6 +45,7 @@ requirejs(['./WorldWindShim', wwd.addLayer(new WorldWind.CompassLayer()); wwd.addLayer(new WorldWind.CoordinatesDisplayLayer(wwd)); wwd.addLayer(new WorldWind.ViewControlsLayer(wwd)); + wwd.addLayer(new WorldWind.WorldWindLogoLayer()); // Create a background layer. var backgroundLayer = new WorldWind.BMNGOneImageLayer(); diff --git a/examples/Collada.js b/examples/Collada.js index fe1064297..9d45211e4 100644 --- a/examples/Collada.js +++ b/examples/Collada.js @@ -54,7 +54,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/Configuration.js b/examples/Configuration.js index cb9e87bb7..a57faa06a 100644 --- a/examples/Configuration.js +++ b/examples/Configuration.js @@ -56,7 +56,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/CustomPlacemark.js b/examples/CustomPlacemark.js index fa91e5609..4b3090cef 100644 --- a/examples/CustomPlacemark.js +++ b/examples/CustomPlacemark.js @@ -51,7 +51,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/DeepPicking.js b/examples/DeepPicking.js index 90f8921b3..8d661ea1e 100644 --- a/examples/DeepPicking.js +++ b/examples/DeepPicking.js @@ -49,7 +49,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/DigitalGlobe.js b/examples/DigitalGlobe.js index af34f1bcb..218fe34d6 100644 --- a/examples/DigitalGlobe.js +++ b/examples/DigitalGlobe.js @@ -56,7 +56,8 @@ requirejs(['./WorldWindShim', // WorldWind UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/GeoJSON.js b/examples/GeoJSON.js index 64d299801..d64311902 100644 --- a/examples/GeoJSON.js +++ b/examples/GeoJSON.js @@ -50,7 +50,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/GeoJSONExporter.js b/examples/GeoJSONExporter.js index b30ecba6d..02f8273df 100644 --- a/examples/GeoJSONExporter.js +++ b/examples/GeoJSONExporter.js @@ -54,7 +54,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/GeoTiff.js b/examples/GeoTiff.js index 2277a46a0..93dbadd39 100644 --- a/examples/GeoTiff.js +++ b/examples/GeoTiff.js @@ -51,7 +51,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/GeographicMeshes.js b/examples/GeographicMeshes.js index 11fc9b2c2..996862f67 100644 --- a/examples/GeographicMeshes.js +++ b/examples/GeographicMeshes.js @@ -50,7 +50,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/GeographicText.js b/examples/GeographicText.js index 4271d9b02..8ee0e3b50 100644 --- a/examples/GeographicText.js +++ b/examples/GeographicText.js @@ -51,7 +51,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/GoToLocation.js b/examples/GoToLocation.js index cbb990e5e..60e15b960 100644 --- a/examples/GoToLocation.js +++ b/examples/GoToLocation.js @@ -51,7 +51,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/HeatMap.js b/examples/HeatMap.js index eedbb3ec6..e7201121b 100644 --- a/examples/HeatMap.js +++ b/examples/HeatMap.js @@ -46,7 +46,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/KML.js b/examples/KML.js index b8527d0a1..0842b09ec 100644 --- a/examples/KML.js +++ b/examples/KML.js @@ -49,7 +49,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/Measurements.js b/examples/Measurements.js index 6f7fb9641..599c60af8 100644 --- a/examples/Measurements.js +++ b/examples/Measurements.js @@ -51,11 +51,13 @@ requirejs([ var pathLayer = new WorldWind.RenderableLayer('Path'); // WorldWindow UI layer. var CoordinatesDisplayLayer = new WorldWind.CoordinatesDisplayLayer(wwd); + var WorldWindLogoLayer = new WorldWind.WorldWindLogoLayer(); wwd.addLayer(BNMGLayer); // Add atmosphere layer on top of base imagery layer. wwd.addLayer(AtmosphereLayer); wwd.addLayer(pathLayer); wwd.addLayer(CoordinatesDisplayLayer); + wwd.addLayer(WorldWindLogoLayer); // Bind our DOM elements where we will display the results. var geoDistSpan = document.getElementById('geo-dist'); diff --git a/examples/MultiWindow.js b/examples/MultiWindow.js index 013db63ff..cbb992f90 100644 --- a/examples/MultiWindow.js +++ b/examples/MultiWindow.js @@ -56,15 +56,17 @@ requirejs(['./WorldWindShim'], function () { return pathLayer; }; - // Create the shared shape layer and imagery layer + // Create the shared shape layer and imagery layer, as well as the logo layer. var pathLayer = makePathLayer(), imageryLayer = new WorldWind.BingAerialWithLabelsLayer(null), - atmosphereLayer = new WorldWind.AtmosphereLayer(); + atmosphereLayer = new WorldWind.AtmosphereLayer(), + logoLayer = new WorldWind.WorldWindLogoLayer(); var wwd1 = new WorldWind.WorldWindow("canvasOne"); wwd1.addLayer(imageryLayer); wwd1.addLayer(atmosphereLayer); wwd1.addLayer(pathLayer); + wwd1.addLayer(logoLayer); // Add a compass layer, view controls layer, and coordinates display layer. Each WorldWindow must have its own. wwd1.addLayer(new WorldWind.CompassLayer()); wwd1.addLayer(new WorldWind.CoordinatesDisplayLayer(wwd1)); @@ -74,6 +76,7 @@ requirejs(['./WorldWindShim'], function () { wwd2.addLayer(imageryLayer); wwd2.addLayer(atmosphereLayer); wwd2.addLayer(pathLayer); + wwd2.addLayer(logoLayer); wwd2.addLayer(new WorldWind.CompassLayer()); wwd2.addLayer(new WorldWind.CoordinatesDisplayLayer(wwd2)); wwd2.addLayer(new WorldWind.ViewControlsLayer(wwd2)); @@ -82,6 +85,7 @@ requirejs(['./WorldWindShim'], function () { wwd3.addLayer(imageryLayer); wwd3.addLayer(atmosphereLayer); wwd3.addLayer(pathLayer); + wwd3.addLayer(logoLayer); wwd3.addLayer(new WorldWind.CompassLayer()); wwd3.addLayer(new WorldWind.CoordinatesDisplayLayer(wwd3)); wwd3.addLayer(new WorldWind.ViewControlsLayer(wwd3)); diff --git a/examples/ParseUrlArguments.js b/examples/ParseUrlArguments.js index 177429d76..5ddcbe3ee 100644 --- a/examples/ParseUrlArguments.js +++ b/examples/ParseUrlArguments.js @@ -53,7 +53,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/Paths.js b/examples/Paths.js index 89ab11f14..9668fb392 100644 --- a/examples/Paths.js +++ b/examples/Paths.js @@ -51,7 +51,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/PickAllShapesInRegion.js b/examples/PickAllShapesInRegion.js index 00ce463bf..c0befb753 100644 --- a/examples/PickAllShapesInRegion.js +++ b/examples/PickAllShapesInRegion.js @@ -51,7 +51,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/PlacemarksAndPicking.js b/examples/PlacemarksAndPicking.js index 62ddb0935..3c85443f2 100644 --- a/examples/PlacemarksAndPicking.js +++ b/examples/PlacemarksAndPicking.js @@ -51,7 +51,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. { layer: new WorldWind.CompassLayer(), enabled: true }, { layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true }, - { layer: new WorldWind.ViewControlsLayer(wwd), enabled: true } + { layer: new WorldWind.ViewControlsLayer(wwd), enabled: true }, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/Polygons.js b/examples/Polygons.js index 949cceb92..425f0c7fe 100644 --- a/examples/Polygons.js +++ b/examples/Polygons.js @@ -51,7 +51,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/RefreshImagery.js b/examples/RefreshImagery.js index 43754b1b5..7d2a2fdb6 100644 --- a/examples/RefreshImagery.js +++ b/examples/RefreshImagery.js @@ -52,7 +52,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/ScreenImage.js b/examples/ScreenImage.js index d1cba2445..07ab38819 100644 --- a/examples/ScreenImage.js +++ b/examples/ScreenImage.js @@ -51,7 +51,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/ScreenText.js b/examples/ScreenText.js index c1f184aab..a94cf08f4 100644 --- a/examples/ScreenText.js +++ b/examples/ScreenText.js @@ -50,7 +50,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/Shapefiles.js b/examples/Shapefiles.js index b858d7d42..3a64a3820 100644 --- a/examples/Shapefiles.js +++ b/examples/Shapefiles.js @@ -50,7 +50,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/SimplestExample.html b/examples/SimplestExample.html index c30c8702b..35433ea72 100644 --- a/examples/SimplestExample.html +++ b/examples/SimplestExample.html @@ -27,10 +27,11 @@ wwd.addLayer(new WorldWind.BMNGOneImageLayer()); wwd.addLayer(new WorldWind.BingAerialWithLabelsLayer()); - // Add a compass, a coordinates display and some view controls to the WorldWindow. + // Add a compass, a coordinates display, some view controls, and the WorldWind logo to the WorldWindow. wwd.addLayer(new WorldWind.CompassLayer()); wwd.addLayer(new WorldWind.CoordinatesDisplayLayer(wwd)); wwd.addLayer(new WorldWind.ViewControlsLayer(wwd)); + wwd.addLayer(new WorldWind.WorldWindLogoLayer()); } diff --git a/examples/SurfaceImage.js b/examples/SurfaceImage.js index 342be5998..3339c88e4 100644 --- a/examples/SurfaceImage.js +++ b/examples/SurfaceImage.js @@ -51,7 +51,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/SurfaceShapes.js b/examples/SurfaceShapes.js index 563ae9635..259db4074 100644 --- a/examples/SurfaceShapes.js +++ b/examples/SurfaceShapes.js @@ -51,7 +51,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/TestMovingSurfaceShapes.js b/examples/TestMovingSurfaceShapes.js index 760c1349f..e96172411 100644 --- a/examples/TestMovingSurfaceShapes.js +++ b/examples/TestMovingSurfaceShapes.js @@ -52,7 +52,8 @@ requirejs(['./WorldWindShim', {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, - {layer: new WorldWind.FrameStatisticsLayer(wwd), enabled: true} + {layer: new WorldWind.FrameStatisticsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/TriangleMeshes.js b/examples/TriangleMeshes.js index f949c75cf..da7f51bf8 100644 --- a/examples/TriangleMeshes.js +++ b/examples/TriangleMeshes.js @@ -50,7 +50,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/WKT.js b/examples/WKT.js index 4b90dad91..516fe06d2 100644 --- a/examples/WKT.js +++ b/examples/WKT.js @@ -49,7 +49,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/WMS.js b/examples/WMS.js index 72a0af3a8..3c7a329a6 100644 --- a/examples/WMS.js +++ b/examples/WMS.js @@ -53,7 +53,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/WMTS.js b/examples/WMTS.js index 0aaac5469..1fcd60967 100644 --- a/examples/WMTS.js +++ b/examples/WMTS.js @@ -55,7 +55,8 @@ requirejs([ // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/examples/WktExporter.js b/examples/WktExporter.js index 914241181..75036ab20 100644 --- a/examples/WktExporter.js +++ b/examples/WktExporter.js @@ -53,7 +53,8 @@ requirejs(['./WorldWindShim', // WorldWindow UI layers. {layer: new WorldWind.CompassLayer(), enabled: true}, {layer: new WorldWind.CoordinatesDisplayLayer(wwd), enabled: true}, - {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true} + {layer: new WorldWind.ViewControlsLayer(wwd), enabled: true}, + {layer: new WorldWind.WorldWindLogoLayer(), enabled: true} ]; for (var l = 0; l < layers.length; l++) { diff --git a/images/worldwind-logo.png b/images/worldwind-logo.png new file mode 100644 index 000000000..a9646944a Binary files /dev/null and b/images/worldwind-logo.png differ diff --git a/src/WorldWind.js b/src/WorldWind.js index 46c0059a4..745838a21 100644 --- a/src/WorldWind.js +++ b/src/WorldWind.js @@ -298,6 +298,8 @@ define([ // PLEASE KEEP ALL THIS IN ALPHABETICAL ORDER BY MODULE NAME (not direc './ogc/wmts/WmtsCapabilities', './layer/WmtsLayer', './ogc/wmts/WmtsLayerCapabilities', + './shapes/WorldWindLogo', + './layer/WorldWindLogoLayer', './WorldWindow', './WorldWindowController', './util/WWMath', @@ -576,6 +578,8 @@ define([ // PLEASE KEEP ALL THIS IN ALPHABETICAL ORDER BY MODULE NAME (not direc WmtsCapabilities, WmtsLayer, WmtsLayerCapabilities, + WorldWindLogo, + WorldWindLogoLayer, WorldWindow, WorldWindowController, WWMath, @@ -1094,6 +1098,8 @@ define([ // PLEASE KEEP ALL THIS IN ALPHABETICAL ORDER BY MODULE NAME (not direc WorldWind['WWMath'] = WWMath; WorldWind['WWMessage'] = WWMessage; WorldWind['WWUtil'] = WWUtil; + WorldWind['WorldWindLogo'] = WorldWindLogo; + WorldWind['WorldWindLogoLayer'] = WorldWindLogoLayer; WorldWind['WorldWindow'] = WorldWindow; WorldWind['WorldWindowController'] = WorldWindowController; diff --git a/src/layer/CoordinatesDisplayLayer.js b/src/layer/CoordinatesDisplayLayer.js index 6df887996..eb791d1fd 100644 --- a/src/layer/CoordinatesDisplayLayer.js +++ b/src/layer/CoordinatesDisplayLayer.js @@ -163,14 +163,14 @@ define([ y = 11; yUnitsScreen = WorldWind.OFFSET_PIXELS; yUnitsText = 0; - } else if (canvasWidth > 400) { // medium canvas, align the text in the top left - x = 60; - y = 5; + } else if (canvasWidth > 400) { // medium canvas, align the text in the top left, below the logo + x = 64; + y = 33; yUnitsScreen = WorldWind.OFFSET_INSET_PIXELS; yUnitsText = 1; - } else { // small canvas, suppress the eye altitude, align the text in the top left and suppress eye alt - x = 60; - y = 5; + } else { // small canvas, suppress the eye altitude, align the text in the top left, below the logo, and suppress eye alt + x = 64; + y = 33; yUnitsScreen = WorldWind.OFFSET_INSET_PIXELS; yUnitsText = 1; hideEyeAlt = true; diff --git a/src/layer/WorldWindLogoLayer.js b/src/layer/WorldWindLogoLayer.js new file mode 100644 index 000000000..112100fd6 --- /dev/null +++ b/src/layer/WorldWindLogoLayer.js @@ -0,0 +1,78 @@ +/* + * Copyright 2003-2006, 2009, 2017, 2020 United States Government, as represented + * by the Administrator of the National Aeronautics and Space Administration. + * All rights reserved. + * + * The NASAWorldWind/WebWorldWind platform is licensed under the Apache License, + * Version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License + * at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed + * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * + * NASAWorldWind/WebWorldWind also contains the following 3rd party Open Source + * software: + * + * ES6-Promise – under MIT License + * libtess.js – SGI Free Software License B + * Proj4 – under MIT License + * JSZip – under MIT License + * + * A complete listing of 3rd Party software notices and licenses included in + * WebWorldWind can be found in the WebWorldWind 3rd-party notices and licenses + * PDF found in code directory. + */ +/** + * @exports WorldWindLogoLayer + */ +define([ + '../shapes/WorldWindLogo', + '../layer/RenderableLayer' +], +function (WorldWindLogo, + RenderableLayer) { + "use strict"; + + /** + * Constructs a WorldWind logo layer. + * @alias WorldWindLogoLayer + * @constructor + * @augments RenderableLayer + * @classdesc Displays the WorldWind Logo. + */ + var WorldWindLogoLayer = function () { + RenderableLayer.call(this, "WorldWind Logo"); + + this._worldWindLogo = new WorldWindLogo(null, null); + + this.addRenderable(this._worldWindLogo); + }; + + WorldWindLogoLayer.prototype = Object.create(RenderableLayer.prototype); + + Object.defineProperties(WorldWindLogoLayer.prototype, { + /** + * The logo to display. + * @type {WorldWindLogo} + * @default {@link WorldWindLogo} + * @memberof WorldWindLogoLayer.prototype + */ + worldWindLogo: { + get: function () { + return this._worldWindLogo; + }, + set: function (worldWindLogo) { + if (worldWindLogo && worldWindLogo instanceof WorldWindLogo) { + this.removeAllRenderables(); + this.addRenderable(worldWindLogo); + this._worldWindLogo = worldWindLogo; + } + } + } + }); + + return WorldWindLogoLayer; +}); \ No newline at end of file diff --git a/src/shapes/WorldWindLogo.js b/src/shapes/WorldWindLogo.js new file mode 100644 index 000000000..73a57be0f --- /dev/null +++ b/src/shapes/WorldWindLogo.js @@ -0,0 +1,101 @@ +/* + * Copyright 2003-2006, 2009, 2017, 2020 United States Government, as represented + * by the Administrator of the National Aeronautics and Space Administration. + * All rights reserved. + * + * The NASAWorldWind/WebWorldWind platform is licensed under the Apache License, + * Version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License + * at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed + * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * + * NASAWorldWind/WebWorldWind also contains the following 3rd party Open Source + * software: + * + * ES6-Promise – under MIT License + * libtess.js – SGI Free Software License B + * Proj4 – under MIT License + * JSZip – under MIT License + * + * A complete listing of 3rd Party software notices and licenses included in + * WebWorldWind can be found in the WebWorldWind 3rd-party notices and licenses + * PDF found in code directory. + */ +/** + * @exports Compass + */ +define([ + '../error/ArgumentError', + '../util/Color', + '../util/Logger', + '../util/Offset', + '../shapes/ScreenImage', + '../shapes/ScreenText', + '../shapes/TextAttributes' +], +function (ArgumentError, + Color, + Logger, + Offset, + ScreenImage, + ScreenText, + TextAttributes) { + "use strict"; + + /** + * Constructs a WorldWind logo attribution. + * @alias WorldWindLogo + * @constructor + * @augments ScreenImage + * @classdesc Displays the official WorldWind logo in the WorldWindow. Its position is specified in WorldWind's configuration. + * @param {Offset} logoScreenOffset The offset indicating the image's placement on the screen. If null or undefined + * the compass is placed at the position stated in WorldWind's configuration. + * Use [the image offset property]{@link ScreenImage#imageOffset} to position the image relative to the + * screen point. + * @param {String} imagePath The URL of the image to display. If null or undefined, a default logo image is used. + */ + var WorldWindLogo = function (logoScreenOffset, imagePath) { + + var sOffset = logoScreenOffset ? logoScreenOffset + : new Offset(WorldWind.OFFSET_FRACTION, 0, WorldWind.OFFSET_FRACTION, 1), + iPath = imagePath ? imagePath : WorldWind.configuration.baseUrl + "images/worldwind-logo.png"; + + ScreenImage.call(this, sOffset, iPath); + + // Must set the configured image offset after calling the constructor above. + + if (!logoScreenOffset) { + this.imageOffset = new Offset(WorldWind.OFFSET_PIXELS, -7, WorldWind.OFFSET_INSET_PIXELS, -7); + } + + // Create version number ScreenText to display it to the right of the logo. + + this.versionTextScreenOffset = new Offset(WorldWind.OFFSET_FRACTION, 0, WorldWind.OFFSET_FRACTION, 1); + this.versionText = new ScreenText(this.versionTextScreenOffset, WorldWind.VERSION); + + // Colors and outline width are configured to match the logo appearance. + this.versionText.attributes = new TextAttributes(null); + this.versionText.attributes.color = new Color(0, 0, 0, 0.5); + this.versionText.attributes.outlineColor = new Color(1, 1, 1, 0.5); + this.versionText.attributes.outlineWidth = 3; + this.versionText.attributes.scale = 1; + + // TODO Compute version text offset with respect to the logo instead of the hardcoding it. + this.versionText.attributes.offset = new Offset(WorldWind.OFFSET_PIXELS, -117, WorldWind.OFFSET_INSET_PIXELS, -10); + }; + + WorldWindLogo.prototype = Object.create(ScreenImage.prototype); + + WorldWindLogo.prototype.render = function (dc) { + + ScreenImage.prototype.render.call(this, dc); + this.versionText.render(dc); + }; + + return WorldWindLogo; +}) +; \ No newline at end of file