Commit 62a40d54 authored by Niels Holt's avatar Niels Holt

routeControl added

parent 327620a8
......@@ -283,6 +283,9 @@
)
);
//Bug fix: Hide routeControl if not on "desktop" = not using L.Control.TimeSlider
if (!desktop && map.routeControl)
$(map.routeControl._container).css('display', 'none');
// See https://github.com/Leaflet/Leaflet/issues/5179
if (maxBounds !== undefined) {
......@@ -456,6 +459,11 @@
map.fire('timezonechange', {timezone: tz});
},
callback: function( result ) {
//Bug fix: Update routeControl
if (map.routeControl)
map.routeControl.setMoment( result.valueMoment );
map.fire('datetimechange', {datetime: result.valueMoment.toISOString()});
}
}).addTo(map);
......
......@@ -483,7 +483,9 @@
var mapStore = window.initCommonMap(store, maps, enablePrint),
mainMap =
window.createCommonMap(store, basemap, maps, minZoom, maxZoom, maxBounds, zoom, lat, lon, enablePrint, useGeoMetoc, mapStore, {
legendControlOptions: {inclHeader: false, containerClassName: 'leaflet-control-box-container hide-when-minimized'} //Legend with no header and hidden when minimized
legendControlOptions: {inclHeader: false, containerClassName: 'leaflet-control-box-container hide-when-minimized'}, //Legend with no header and hidden when minimized
routeControl: true,
});
//Create top menu when all resources (js and css) are loaded
......
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