Commit c6d1f18b authored by Niels Holt's avatar Niels Holt

Merge branch 'release/3.5.0'

parents 8e41f674 a0cca86a
...@@ -4,4 +4,5 @@ ...@@ -4,4 +4,5 @@
/.sass-cache/ /.sass-cache/
/dev/ /dev/
/dist/ /dist/
/temp*/ /temp*/
\ No newline at end of file /secret.json
<!DOCTYPE html>
<!--
*****************************************************
Reload to parent dir with #domain=PARENT_DIR_NAME
E.g.
If inside ifm.fcoo.dk/denmark it will reload to
ifm.fcoo.dk#domain=denmark
*****************************************************
-->
<html lang="da" style="font-size: 100%">
<head>
<meta charset="utf-8" />
</head>
<body onload="reload()">
<script type="text/javascript">
function reload(){
var hash = window.location.hash.slice(1),
search = window.location.search,
href = window.location.href,
hrefArray = href.split('/'),
fileName = hrefArray.pop(),
domain = hrefArray.pop();
fileName = fileName.split('#')[0];
fileName = fileName.split('?')[0];
hrefArray.push(fileName);
window.location.href = hrefArray.join('/') + search + '#domain=' + domain + (hash ? '&' + hash : '');
}
</script>
</body>
</html>
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
/** /**
* Initialization after DOM is loaded * Initialization after DOM is loaded
*/ */
function createCommonMap(store, basemap, maps, minZoom, maxZoom, zoom, lat, function createCommonMap(store, basemap, maps, minZoom, maxZoom, maxBounds, zoom, lat,
lon, enablePrint, useGeoMetoc, lon, enablePrint, useGeoMetoc,
mapStore) { mapStore) {
var localLang, var localLang,
...@@ -275,6 +275,11 @@ ...@@ -275,6 +275,11 @@
layers: [baseMaps[Object.keys(baseMaps)[0]][basemap]] layers: [baseMaps[Object.keys(baseMaps)[0]][basemap]]
}); });
// See https://github.com/Leaflet/Leaflet/issues/5179
if (maxBounds !== undefined) {
map.setMaxBounds(maxBounds);
}
// Temporary fix for Leaflet issue #3765 // Temporary fix for Leaflet issue #3765
//map.on('zoomend', function() { //map.on('zoomend', function() {
//map.fire('viewreset'); //map.fire('viewreset');
......
...@@ -31,9 +31,10 @@ ...@@ -31,9 +31,10 @@
window.domain = urlParams.domain; window.domain = urlParams.domain;
} }
// Initialize minumum and maximum zoom // Initialize minumum, maximum zoom and bounds
var minZoom = 3; var minZoom = 3;
var maxZoom = 12; var maxZoom = 12;
var maxBounds = undefined;
// We use a proxy for getting overlay information. The proxy // We use a proxy for getting overlay information. The proxy
// merges requests to the same datafile together to one // merges requests to the same datafile together to one
...@@ -355,6 +356,37 @@ ...@@ -355,6 +356,37 @@
lon = -18.0; lon = -18.0;
break; break;
//*********************************
case 'global':
overlays = {
"Forecasts": {
"wind": store.getLayer({'dataset': 'ECMWF/DXD/GLOBAL', 'parameter': 'windDirection', 'options': stdOpts, wmsParams: {styles: 'vector_method=color_quiver1,vector_spacing=80,vector_offset=20'}, legendParams: {show: true}}),
"windspeed": store.getLayer({'dataset': 'ECMWF/DXD/GLOBAL', 'parameter': 'windSpeed', 'options': stdOpts}),
"winddirection": store.getLayer({'dataset': 'ECMWF/DXD/GLOBAL', 'parameter': 'windDirection', 'options': stdOpts, wmsParams: {styles: 'vector_method=black_vector,vector_spacing=80,vector_offset=20'}}),
"windbarbs": store.getLayer({'dataset': 'ECMWF/DXD/GLOBAL', 'parameter': 'windDirection', 'options': stdOpts}),
"pressure": store.getLayer({'dataset': 'ECMWF/DXD/GLOBAL', 'parameter': 'seaLevelPressure', 'options': stdOpts}),
"precip": store.getLayer({'dataset': 'ECMWF/DXD/GLOBAL', 'parameter': 'totalPrecipitation', 'options': stdOpts}),
"airtemp": store.getLayer({'dataset': 'ECMWF/DXD/GLOBAL', 'parameter': 'airTemperature', 'options': stdOpts}),
"cloudcover": store.getLayer({'dataset': 'ECMWF/DXD/GLOBAL', 'parameter': 'totalCloudCover', 'options': stdOpts}),
"waveperiod": store.getLayer({'dataset': 'ECMWF/DXP/GLOBAL', 'parameter': 'wavePeriod', 'options': stdOpts}),
"waveheight": store.getLayer({'dataset': 'ECMWF/DXP/GLOBAL', 'parameter': 'waveHeight', 'options': stdOpts}),
"seastate": store.getLayer({'dataset': 'ECMWF/DXP/GLOBAL', 'parameter': 'seaState', 'options': stdOpts}),
"wavedirection": store.getLayer({'dataset': 'ECMWF/DXP/GLOBAL', 'parameter': 'waveDirection', 'options': stdOpts})
},
"Celestial information": {
"Solar Terminator": store.getSolarTerminator()
},
"Static layers": {
"EEZ": store.getEEZ(),
}
};
zoom = 4;
maxZoom = 8;
lat = 55.0;
lon = -18.0;
maxBounds = null;
break;
//********************************* //*********************************
default: default:
var hash = window.location.hash.slice(1), var hash = window.location.hash.slice(1),
...@@ -434,7 +466,7 @@ ...@@ -434,7 +466,7 @@
$(document).ready(function () { $(document).ready(function () {
//console.profile('ready'); //console.profile('ready');
window.createCommonMap(store, basemap, maps, minZoom, maxZoom, zoom, lat, lon, enablePrint, useGeoMetoc, mapStore); window.createCommonMap(store, basemap, maps, minZoom, maxZoom, maxBounds, zoom, lat, lon, enablePrint, useGeoMetoc, mapStore);
//console.profileEnd(); //console.profileEnd();
}); });
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
//List of areas //List of areas
var areas = [ var areas = [
{ da: 'Global', en:'Global', href: getHref('global'), bounds: [[90.0, -180.0], [-90.0, 180.0]] },
{ da: 'Europa', en:'Europe', href: getHref('europe'), bounds: [[85.9585, -85.9219], [28.0437, 41.9063]] }, { da: 'Europa', en:'Europe', href: getHref('europe'), bounds: [[85.9585, -85.9219], [28.0437, 41.9063]] },
{ da: 'Danmark', en:'Denmark', href: getHref('denmark'), bounds: [[61.0157, -3.3618], [ 52.8558, 24.5214]] }, { da: 'Danmark', en:'Denmark', href: getHref('denmark'), bounds: [[61.0157, -3.3618], [ 52.8558, 24.5214]] },
{ da: 'Grønland', en:'Greenland', href: getHref('greenland'), bounds: [[76.7605, -61.2158], [ 58.6198, -16.2158]] }, { da: 'Grønland', en:'Greenland', href: getHref('greenland'), bounds: [[76.7605, -61.2158], [ 58.6198, -16.2158]] },
......
{ {
"name": "ifm-maps", "name": "ifm-maps",
"version": "3.4.1", "version": "3.5.0",
"homepage": "https://github.com/FCOO/ifm-maps", "homepage": "https://github.com/FCOO/ifm-maps",
"authors": [ "authors": [
"Jesper Baasch-Larsen jla@fcoo.dk", "Jesper Baasch-Larsen jla@fcoo.dk",
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
"url": "git://github.com/FCOO/ifm-maps.git" "url": "git://github.com/FCOO/ifm-maps.git"
}, },
"dependencies": { "dependencies": {
"fcoo-application": "fcoo/fcoo-application#~1.7.0", "fcoo-application": "fcoo/fcoo-application#~1.8.0",
"fcoo-leaflet": "fcoo/fcoo-leaflet#~1.3.0", "fcoo-leaflet": "fcoo/fcoo-leaflet#~1.4.0",
"moment": "2.17.1", "moment": "2.17.1",
"jquery-ui": "1.12.1", "jquery-ui": "1.12.1",
"noty": "2.3.8", "noty": "2.3.11",
"leaflet-control-position": "fcoo/leaflet-control-position#~0.2.5", "leaflet-control-position": "fcoo/leaflet-control-position#~0.2.5",
"leaflet-control-legend": "fcoo/leaflet-control-legend#~1.0.3", "leaflet-control-legend": "fcoo/leaflet-control-legend#~1.0.3",
"leaflet-categorized-layers": "fcoo/leaflet-categorized-layers#~0.1.2", "leaflet-categorized-layers": "fcoo/leaflet-categorized-layers#~0.1.2",
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
"leaflet-control-datetime": "fcoo/leaflet-control-datetime#~1.0.2", "leaflet-control-datetime": "fcoo/leaflet-control-datetime#~1.0.2",
"leaflet-control-fa-button": "fcoo/leaflet-control-fa-button#~1.0.2", "leaflet-control-fa-button": "fcoo/leaflet-control-fa-button#~1.0.2",
"leaflet-tilelayer-wms-pydap": "fcoo/leaflet-tilelayer-wms-pydap#~1.1.5", "leaflet-tilelayer-wms-pydap": "fcoo/leaflet-tilelayer-wms-pydap#~1.1.5",
"leaflet-tilelayer-wms-fcoo": "fcoo/leaflet-tilelayer-wms-fcoo#~1.1.3", "leaflet-tilelayer-wms-fcoo": "fcoo/leaflet-tilelayer-wms-fcoo#~1.2.0",
"leaflet-geojsonlayer-fwarn": "fcoo/leaflet-geojsonlayer-fwarn#~0.2.4", "leaflet-geojsonlayer-fwarn": "fcoo/leaflet-geojsonlayer-fwarn#~0.2.4",
"leaflet-layer-sealevel-denmark": "fcoo/leaflet-layer-sealevel-denmark#~0.1.4", "leaflet-layer-sealevel-denmark": "fcoo/leaflet-layer-sealevel-denmark#~0.1.4",
"leaflet-layer-tides-greenland": "fcoo/leaflet-layer-tides-greenland#~0.1.5", "leaflet-layer-tides-greenland": "fcoo/leaflet-layer-tides-greenland#~0.1.5",
...@@ -79,11 +79,11 @@ ...@@ -79,11 +79,11 @@
"es6" "es6"
], ],
"resolutions": { "resolutions": {
"fcoo-application": "~1.7.0", "fcoo-application": "~1.8.0",
"fcoo-leaflet": "~1.3.0", "fcoo-leaflet": "~1.4.0",
"moment": "2.15.2", "moment": "2.15.2",
"jquery-ui": "1.12.1", "jquery-ui": "1.12.1",
"noty": "2.3.8", "noty": "2.3.11",
"leaflet-control-position": "~0.2.5", "leaflet-control-position": "~0.2.5",
"leaflet-control-legend": "~1.0.3", "leaflet-control-legend": "~1.0.3",
"leaflet-categorized-layers": "~0.1.2", "leaflet-categorized-layers": "~0.1.2",
......
{ {
"name": "ifm-maps", "name": "ifm-maps",
"version": "3.4.1", "version": "3.5.0",
"homepage": "https://github.com/FCOO/ifm-maps", "homepage": "https://github.com/FCOO/ifm-maps",
"authors": [ "authors": [
"Jesper Baasch-Larsen jla@fcoo.dk", "Jesper Baasch-Larsen jla@fcoo.dk",
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
}, },
"dependencies": { "dependencies": {
"grunt": "^1.0.1", "grunt": "^1.0.1",
"grunt-fcoo-grunt-plugin": "^2.0.0" "grunt-fcoo-grunt-plugin": "^2.8.0"
}, },
"license": "MIT", "license": "MIT",
"devDependencies": {} "devDependencies": {}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment