From b953775de2efede463f2658f54dfa3688aac473e Mon Sep 17 00:00:00 2001 From: Greg Bowering Date: Fri, 27 Oct 2017 11:36:02 +1030 Subject: [PATCH 1/2] Default OSM Mapnik layer to 50% opacity The OSM Mapnik tiles from http://a.tile.openstreetmap.org/ are fully opaque PNG tiles which makes it a base layer and unusable as an overlay. Most WWJ applications would likely prefer to use OSM as an overlay. The NASA OpenStreetMap map cache at https://worldwind20.arc.nasa.gov/mapcache served OSM overlay tiles that included transparent voids, however that server is currently returning 404 Not Found for /mapcache Using OSMMapnickLayer with a default 50% opacity is a simple substitution for the broken NASA OSM layer. --- src/gov/nasa/worldwind/layers/Earth/OSMMapnikLayer.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gov/nasa/worldwind/layers/Earth/OSMMapnikLayer.java b/src/gov/nasa/worldwind/layers/Earth/OSMMapnikLayer.java index 94c56d1069..decfb9580f 100644 --- a/src/gov/nasa/worldwind/layers/Earth/OSMMapnikLayer.java +++ b/src/gov/nasa/worldwind/layers/Earth/OSMMapnikLayer.java @@ -17,9 +17,12 @@ */ public class OSMMapnikLayer extends BasicMercatorTiledImageLayer { + static final double DEFAULT_OPACITY = 0.5d; + public OSMMapnikLayer() { super(makeLevels()); + setOpacity(DEFAULT_OPACITY); } private static LevelSet makeLevels() From 2b76391d230efec1d4a7ef616b0882fca997371c Mon Sep 17 00:00:00 2001 From: Greg Bowering Date: Fri, 27 Oct 2017 11:40:27 +1030 Subject: [PATCH 2/2] Replace broken NASA OSM layer with OSMMapnickLayer Note the NASA OSM layer configured via config/Earth/OpenStreetMap.xml points to https://worldwind20.arc.nasa.gov/mapcache which is currently returning 404 Not Found errors --- src/config/worldwind.layers.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config/worldwind.layers.xml b/src/config/worldwind.layers.xml index d7ffef9a59..4f13effede 100644 --- a/src/config/worldwind.layers.xml +++ b/src/config/worldwind.layers.xml @@ -30,14 +30,14 @@ - + - + - \ No newline at end of file +