From c991041b5d437cd3de585ad56493e3ea7eb51bb0 Mon Sep 17 00:00:00 2001
From: Tor-Einar Skog <tor-einar.skog@bioforsk.no>
Date: Thu, 1 Dec 2016 14:04:43 -0800
Subject: [PATCH] Added color background map. Fixed protocol issues

---
 src/main/webapp/js/objectGISInfoMap.js    |  4 ++--
 src/main/webapp/test/fireblight/js/map.js | 23 +++++++++++++++++++----
 2 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/src/main/webapp/js/objectGISInfoMap.js b/src/main/webapp/js/objectGISInfoMap.js
index af4e7797..52f6ae78 100755
--- a/src/main/webapp/js/objectGISInfoMap.js
+++ b/src/main/webapp/js/objectGISInfoMap.js
@@ -125,8 +125,8 @@ function initGisInfoMap(containerId, center, zoomLevel, displayMarker, drawnObjs
       }
     })
   });
-
-
+  
+  
 
   //########################Get maplayers you can choose from########################
 
diff --git a/src/main/webapp/test/fireblight/js/map.js b/src/main/webapp/test/fireblight/js/map.js
index 99e243a8..28f88cf9 100644
--- a/src/main/webapp/test/fireblight/js/map.js
+++ b/src/main/webapp/test/fireblight/js/map.js
@@ -25,11 +25,10 @@ function initMap()
     source: new ol.source.TileWMS({
         attributions: [
             new ol.Attribution({
-              html: "Kartgrunnlag: Statens kartverk (<a href='http://creativecommons.org/licenses/by-sa/3.0/no/' target='new'>cc-by-sa-3.0</a>)"
+              html: "Kartgrunnlag: Statens kartverk (<a href='//creativecommons.org/licenses/by-sa/3.0/no/' target='new'>cc-by-sa-3.0</a>)"
             })
           ],
-      url: "http://opencache.statkart.no/gatekeeper/gk/gk.open?",
-      //url: "//openwms.statkart.no/skwms1/wms.topo2.graatone?"//,
+      url: "//opencache.statkart.no/gatekeeper/gk/gk.open?",
       params: {
         LAYERS: 'topo2graatone',
         VERSION: '1.1.1'
@@ -37,6 +36,21 @@ function initMap()
     })
   });
   
+  // Detailed Norway map in colours
+  var topo2 = 
+          new ol.layer.Tile({
+    title: "Farger",
+    type: 'base',
+    visible: true,
+    source: new ol.source.TileWMS({
+      url: "//opencache.statkart.no/gatekeeper/gk/gk.open?",
+      params: {
+        LAYERS: 'topo2',
+        VERSION: '1.1.1'
+      }
+    })
+  });
+  
   // The layer for putting the data
   var features = new ol.Collection();
 
@@ -129,7 +143,8 @@ var styles = {
   map = new ol.Map({
         target: 'map',
         layers: [
-          topo2graatone,
+          //topo2graatone, 
+          topo2,
           featureOverlay,
           newFeatureOverlay
         ],
-- 
GitLab