diff --git a/code/boot.js b/code/boot.js index 22838c92..d9d4f884 100644 --- a/code/boot.js +++ b/code/boot.js @@ -242,6 +242,20 @@ window.setupMap = function() { // Remove the hidden layer after layerChooser built, to avoid messing up ordering of layers $.each(hiddenLayer, function(ind, layer){ map.removeLayer(layer); + + // as users often become confused if they accidentally switch a standard layer off, display a warning in this case + $('#portaldetails').html('
' + +'

Warning: some of the standard layers are turned off. Some portals/links/fields will not be visible.

' + +'Enable standard layers' + +'
'); + + $('#enable_standard_layers').on('click', function() { + $.each(addLayers, function(ind, layer) { + if (!map.hasLayer(layer)) map.addLayer(layer); + }); + $('#portaldetails').html(''); + }); + }); map.addControl(window.layerChooser); diff --git a/style.css b/style.css index df690235..f3a0aaf8 100644 --- a/style.css +++ b/style.css @@ -1060,3 +1060,10 @@ table.artifact td.info { .no-pointer-events { pointer-events: none; } + + +.layer_off_warning { + color: #FFCE00; + margin: 8px; + text-align: center; +}