update Fr 10. Jul 13:31:01 CEST 2020

This commit is contained in:
Robert Richter 2020-07-10 13:31:01 +02:00
parent f7fbf50096
commit 052567c28d
3 changed files with 15 additions and 7 deletions

View File

@ -150,6 +150,8 @@ module.exports = function (app, sql, uuidv4, app_cfg, passport, auth, udp, saver
title: 'Alarmmonitor',
wachen_id: parmeter_id,
data_wache: wache.name,
map_tile: app_cfg.public.map_tile,
map_attribution: app_cfg.public.map_attribution,
app_id: app_cfg.global.app_id,
user: req.user
});
@ -183,6 +185,8 @@ module.exports = function (app, sql, uuidv4, app_cfg, passport, auth, udp, saver
res.render('overviews/overview_dbrd', {
public: app_cfg.public,
title: 'Dashboard',
map_tile: app_cfg.public.map_tile,
map_attribution: app_cfg.public.map_attribution,
user: req.user,
dataSet: data
});
@ -199,6 +203,8 @@ module.exports = function (app, sql, uuidv4, app_cfg, passport, auth, udp, saver
public: app_cfg.public,
title: 'Dashboard',
dbrd_uuid: dbrd_uuid,
map_tile: app_cfg.public.map_tile,
map_attribution: app_cfg.public.map_attribution,
app_id: app_cfg.global.app_id,
user: req.user
});

View File

@ -11,5 +11,7 @@ block content
script(src='/js/leaflet.js')
script.
dbrd_uuid="#{dbrd_uuid}"
map_tile="#{map_tile}"
map_attribution="#{map_attribution}"
client_id="#{app_id}"
script(src='/js/client_dbrd.js')

View File

@ -10,7 +10,7 @@ block content
.col-12.p-3
.card.bg-dark
.card-body.text-center.text-muted
h3 - wählen Sie ein Dashboard -
h3 - Dashboard- -
each val, index in dataSet
.col-12.col-xl-6.d-flex.align-self-stretch.p-3
.card.w-100
@ -37,9 +37,8 @@ block content
script(src='/js/leaflet.js')
script.
// TODO: internen Kartendienst nutzen
// TODO: Kartendienst-Credit anzeigen
// var map_tile = !{JSON.stringify(public.map_tile).replace(/<\//g, '<\\/')}
var map_tile="#{map_tile}"
var map_attribution="#{map_attribution}"
var data = !{JSON.stringify(dataSet).replace(/<\//g, '<\\/')}
for (var i in data) {
// Karte definieren
@ -48,8 +47,9 @@ block content
});
// Layer der Karte
mapLink = L.tileLayer(
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 12
map_tile, {
maxZoom: 12,
attribution: map_attribution
}).addTo(map);
// Karte setzen
var geojson = L.geoJSON(JSON.parse(data[i].wgs84_area)).addTo(map);