Commit d694c73b authored by Niels Holt's avatar Niels Holt

Merge branch 'release/5.2.1'

parents eab1ebdf 43772fdd
......@@ -36,6 +36,7 @@ CONTACT : info@fcoo.dk
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["setDoNotTrack", true]);
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
......@@ -52,6 +53,5 @@ CONTACT : info@fcoo.dk
<p><img src="//analytics.fcoo.dk/piwik/piwik.php?idsite={APPLICATION_PIWIKSITEID}" style="border:0;" alt="" /></p>
</noscript>
<!-- End Piwik Code -->
</body>
</html>
......@@ -18,9 +18,8 @@
},
{
"id": "5_2_0",
"date": "2018-07-01",
"date": "2018-09-05",
"url": "data/ifm-maps-v5.2.0.md",
"publish": false,
"title": {"da":"Ny version af Sejladsudsigt (v5.2.0)", "en":"New version of Marine Forecast (v5.2.0)"}
}
......
......@@ -6,19 +6,5 @@ I denne version er der følgende tilføjelser og rettelser
We are continuing improving Marine Forecast.
This version has the following additions and corrections
</en>
<!-- - <da>Korte meteorologiske prognoser for Grønland fra DMIs nye prognosemodel HARMONIE-IGB (2.5km)</da><en>Short-range weather forecast for Greenland from DMI's new forecast model HARMONIE-IGB (2.5km)</en> -->
<da>- Mulighed for at "låse" (<span class="far fa-thumbtack"/>) de små popup vinduer, så de ikke lukker, når man klikker på kortet</da>
<en>- Possible to "lock" (<span class="far fa-thumbtack"/>) the small pop-up windows preventing them from closing when you click on the map</da>
<!--
<da>- Rettelse af fejl inklusiv navn til Web Application på mobile enheder ("Føj til Startskærm")</da>
<en>- Corrections of errors including name for Web Application on mobile devices ("Add to Home Screen")</en>
<da>- Bedre og (lidt) hurtigere indlæsning af siden</da>
<en>- Better and (a bit) faster loading of the page</en>
<da>- Zoom med muse-hjul forbedret og tilnærmet Google Maps</da>
<en>- Zoom using the mouse wheel improved and more similar to Google Maps</en>
<da>- Mindre rettelser af design, knapper og "Vis din position"</da>
<en>- Minor corrections of design, buttons, and "Show your location"</en>
-->
\ No newline at end of file
<da>- Advarsel i Signaturforklaringer, hvis opdatering af en prognose er forsinket</da><en>- Warning in Legend if the update of a forecast is delayed</en>
<da>- Rettelse af fejl (primært ift. IE11) og mindre opdateringer</da><en>- Error corrections (primary for IE11) and minor updating</en>
<da>
Vi arbejder løbende på at forbedre Sejladsudsigt.
I denne version er der følgende tilføjelser og rettelser
</da>
<en>
We are continuing improving Marine Forecast.
This version has the following additions and corrections
</en>
<da>- Vores WMS system er blevet optimeret, hvilket burde resultere i forbedret hastighed ved generering af prognosefelter</da><en>- Our WMS system has been optimized, which should provide a faster generation of forecast fields</en>
<!-- - <da>Korte meteorologiske prognoser for Grønland fra DMIs nye prognosemodel HARMONIE-IGB (2.5km)</da><en>Short-range weather forecast for Greenland from DMI's new forecast model HARMONIE-IGB (2.5km)</en> -->
<da>- Mulighed for at "låse" (<span class="far fa-thumbtack"/>) de små popup vinduer, så de ikke lukker, når man klikker på kortet</da>
<en>- Possible to "lock" (<span class="far fa-thumbtack"/>) the small pop-up windows preventing them from closing when you click on the map</da>
<!--
<da>- Rettelse af fejl inklusiv navn til Web Application på mobile enheder ("Føj til Startskærm")</da>
<en>- Corrections of errors including name for Web Application on mobile devices ("Add to Home Screen")</en>
<da>- Bedre og (lidt) hurtigere indlæsning af siden</da>
<en>- Better and (a bit) faster loading of the page</en>
<da>- Zoom med muse-hjul forbedret og tilnærmet Google Maps</da>
<en>- Zoom using the mouse wheel improved and more similar to Google Maps</en>
<da>- Mindre rettelser af design, knapper og "Vis din position"</da>
<en>- Minor corrections of design, buttons, and "Show your location"</en>
-->
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/*
leaflet-baselayergroup.js,
(c) 2016, FCOO
https://gitlab.com/fcoo/leaflet-baselayergroup
https://gitlab.com/fcoo
*/
(function ($, L/*, window, document, undefined*/) {
"use strict";
L.BaseLayerGroup = L.LayerGroup.extend({
// Layer for FCOO basemaps
initialize: function (background, foreground, toplayer) {
this._layers = {};
this.background = background;
this.foreground = foreground;
this.toplayer = toplayer;
this.addLayer(background);
this.addLayer(toplayer);
// The foreground is not added per initially but
// only if a baselayerforegroundadd signal is sent
},
onAdd: function (map) {
var _this = this;
// Setup event listeners
map.on('baselayerforegroundadd', function() {
_this.addForeground(map);
});
map.on('baselayerforegroundremove', function() {
_this.removeForeground(map);
});
for (var i in this._layers) {
map.addLayer(this._layers[i]);
}
},
onRemove: function (map) {
map.off('baselayerforegroundadd');
map.off('baselayerforegroundremove');
for (var i in this._layers) {
map.removeLayer(this._layers[i]);
}
},
addForeground: function(map) {
this.foreground.addTo(map);
},
removeForeground: function(map) {
this.foreground.removeFrom(map);
}
});
}(jQuery, L, this, document));
......@@ -42,7 +42,7 @@
* We encapsulate the changeDatetime callback in an object to produce
* a closure for overlays.
*/
function DatetimeCallback(overlays) {
function DatetimeCallback(overlays, map) {
/**
* Called when something is updated in the datetime selector. If
* type is 'datetime' all overlays with timesteps will be updated
......@@ -52,6 +52,8 @@
* @param type string
* @param arg date|boolean
*/
this.map = map;
this.changeDatetime = function (type, arg) {
var i, j, k,
layergroup,
......@@ -62,6 +64,11 @@
t,
dt;
if (type == 'datetime') {
//Bug fix: Update routeControl
if (this.map.routeControl)
this.map.routeControl.setMoment( moment(arg) );
for (i in overlays) {
layergroup = overlays[i];
for (j in layergroup) {
......@@ -283,9 +290,9 @@
)
);
//Bug fix: Hide routeControl if not on "desktop" = not using L.Control.TimeSlider
if (!desktop && map.routeControl)
$(map.routeControl._container).css('display', 'none');
//HER //Bug fix: Hide routeControl if not on "desktop" = not using L.Control.TimeSlider
//HER if (!desktop && map.routeControl)
//HER $(map.routeControl._container).css('display', 'none');
// See https://github.com/Leaflet/Leaflet/issues/5179
if (maxBounds !== undefined) {
......@@ -433,8 +440,8 @@
var dt_check = 10; // How often to check
var dt_max = 30000; // When to give up
var dt_current = 0;
var callback_obj = new DatetimeCallback(overlayMaps);
var callback = callback_obj.changeDatetime;
var callback_obj = new DatetimeCallback(overlayMaps, map);
var callback = $.proxy( callback_obj.changeDatetime, callback_obj);
function checkTimesteps() {
var dates = getTimeSteps(overlayMaps);
if ((dates !== null) && (document.readyState == "complete")) {
......
{
"name": "ifm-maps",
"version": "5.2.0",
"version": "5.2.1",
"homepage": "https://github.com/FCOO/ifm-maps",
"authors": [
"Jesper Baasch-Larsen jla@fcoo.dk",
"Brian Sørensen brs@fcoo.dk",
"Niels Holt nho@fcoo.dk"
],
"description": "",
......@@ -13,7 +13,7 @@
},
"dependencies": {
"fcoo-application": "https://gitlab.com/FCOO/fcoo-application.git#^5.3.0",
"fcoo-leaflet": "https://gitlab.com/fcoo/fcoo-leaflet.git#^4.3.0",
"fcoo-leaflet": "https://gitlab.com/fcoo/fcoo-leaflet.git#~4.7.0",
"jquery-ui": "^1.12.1",
"leaflet-control-position": "fcoo/leaflet-control-position#~0.2.5",
"leaflet-categorized-layers": "fcoo/leaflet-categorized-layers#^2.0.0",
......@@ -22,13 +22,19 @@
"leaflet-control-vertical": "fcoo/leaflet-control-vertical#^2.0.0",
"leaflet-control-datetime": "fcoo/leaflet-control-datetime#^1.0.0",
"leaflet-tilelayer-wms-pydap": "https://gitlab.com/fcoo/leaflet-tilelayer-wms-pydap.git#^4.0.0",
"fcoo-leaflet-tilelayer-wms": "https://gitlab.com/fcoo/fcoo-leaflet-tilelayer-wms.git#^5.0.0",
"leaflet-geojsonlayer-fwarn": "fcoo/leaflet-geojsonlayer-fwarn#^1.0.0",
"leaflet-layer-sealevel-denmark": "fcoo/leaflet-layer-sealevel-denmark#^0.2.0",
"leaflet-layer-tides-greenland": "fcoo/leaflet-layer-tides-greenland#^0.1.5",
"leaflet-geojsonlayer-msi": "fcoo/leaflet-geojsonlayer-msi#^1.0.0",
"babel-polyfill": "^0.0.1"
},
"resolutions": {
"fcoo-leaflet": "~4.7.0",
"leaflet-geojsonlayer-fwarn": "^1.0.0",
"leaflet-layer-sealevel-denmark": "^0.2.0",
"leaflet-layer-tides-greenland": "^0.1.5",
"leaflet-geojsonlayer-msi": "^1.0.0"
},
"overrides": {
"jquery-ui": {
"main": [
......@@ -41,83 +47,7 @@
]
},
"leaflet-control-osm-geocoder": {
"main": [
"Control.OSMGeocoder.js"
]
},
"offline": {
"main": [
"offline.js"
]
},
"url.js": {
"main": [
"src/url.min.js"
]
},
"moment": {
"main": [
"moment.js",
"locale/da.js",
"locale/de.js",
"locale/sv.js",
"locale/nb.js",
"locale/fo.js"
]
},
"select2": {
"main": [
"dist/js/select2.js"
]
},
"jquery.scrollbar": {
"main": [
"jquery.scrollbar.js"
]
},
"bootstrap": {
"dependencies": {
"jquery": "latest"
},
"main": [
"dist/js/bootstrap.bundle.js"
]
},
"leaflet": {
"dependencies": {
"fcoo-global-switches": "latest"
}
},
"leaflet.locatecontrol": {
"main": [
"src/L.Control.Locate.js"
]
},
"leaflet-icon-pulse": {
"main": [
"src/L.Icon.Pulse.js",
"src/L.Icon.Pulse.css"
]
},
"Leaflet.Geodesic": {
"dependencies": {
"leaflet": "latest"
}
},
"Leaflet.GeometryUtil": {
"main": [
"src/leaflet.geometryutil.js"
]
},
"_geodesy": {
"main": [
"latlon-spherical.js"
]
},
"leaflet-pip": {
"main": [
"leaflet-pip.js"
]
"main": "Control.OSMGeocoder.js"
}
},
"devDependencies": {
......@@ -135,10 +65,5 @@
],
"moduleType": [
"es6"
],
"resolutions": {
"url.js": "2.4.0",
"i18next-phrases": "^2.0.0",
"bootstrap": "^4.0.0"
}
]
}
\ No newline at end of file
{
"name": "ifm-maps",
"version": "5.2.0",
"version": "5.2.1",
"homepage": "https://github.com/FCOO/ifm-maps",
"authors": [
"Jesper Baasch-Larsen jla@fcoo.dk",
......
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