Skip to content
Snippets Groups Projects
Commit f362fba5 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Added data-mainmap-height to allow for custom map heights

parent c1d8bd01
Branches
Tags
2 merge requests!22Develop,!18Spotit nordic map layers
...@@ -21,7 +21,7 @@ along with VIPSLogic. If not, see <http://www.nibio.no/licenses/>. ...@@ -21,7 +21,7 @@ along with VIPSLogic. If not, see <http://www.nibio.no/licenses/>.
Author : Tor-Einar Skog <tor-einar.skog@nibio.no> Author : Tor-Einar Skog <tor-einar.skog@nibio.no>
Using CSS grid layout with fallback for MS browsers Using CSS grid layout with fallback for MS browsers
*/ */
#mainMap { grid-area: mainMap; height: 450px;} #mainMap { grid-area: mainMap; /*height: 450px;*/}
#subMap1 { grid-area: subMap1; height: 250px;} #subMap1 { grid-area: subMap1; height: 250px;}
#subMap2 { grid-area: subMap2; height: 250px;} #subMap2 { grid-area: subMap2; height: 250px;}
#subMap3 { grid-area: subMap3; height: 250px;} #subMap3 { grid-area: subMap3; height: 250px;}
......
...@@ -54,6 +54,7 @@ var initMap = function () ...@@ -54,6 +54,7 @@ var initMap = function ()
var nordicSeptoriaMapContainer = document.getElementById("nordicSeptoriaMapContainer"); var nordicSeptoriaMapContainer = document.getElementById("nordicSeptoriaMapContainer");
// This is being used by dict, the translation tables // This is being used by dict, the translation tables
language = nordicSeptoriaMapContainer.getAttribute("data-language") !== null ? nordicSeptoriaMapContainer.getAttribute("data-language") : language; language = nordicSeptoriaMapContainer.getAttribute("data-language") !== null ? nordicSeptoriaMapContainer.getAttribute("data-language") : language;
var mainMapHeight = nordicSeptoriaMapContainer.getAttribute("data-mainmap-height") !== null ? nordicSeptoriaMapContainer.getAttribute("data-mainmap-height") : "450px";
// Giving the user the option to choose between the different views // Giving the user the option to choose between the different views
var viewRadioList = ""; var viewRadioList = "";
for (var i in views) for (var i in views)
...@@ -69,7 +70,7 @@ var initMap = function () ...@@ -69,7 +70,7 @@ var initMap = function ()
} }
// This HTML is injected into the hosting web page. It contains all of the // This HTML is injected into the hosting web page. It contains all of the
// maps and the controls // maps and the controls
nordicSeptoriaMapContainer.innerHTML = "<div id='mainMap'>" nordicSeptoriaMapContainer.innerHTML = "<div id='mainMap' style='height: " + mainMapHeight + "'>"
+ " <div id='popupTooltip_mainMap' class='ol-popup'>" + " <div id='popupTooltip_mainMap' class='ol-popup'>"
+ " <span class='ol-popup-closer' onclick='closeOverlay(this);'></span>" + " <span class='ol-popup-closer' onclick='closeOverlay(this);'></span>"
+ " <div></div>" + " <div></div>"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment