Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alfakhori
M4labplatform
Commits
23cc6b81
Commit
23cc6b81
authored
Feb 01, 2021
by
Patrick
Browse files
update waiting
parent
80241bd6
Changes
8
Show whitespace changes
Inline
Side-by-side
vcm/config.json
View file @
23cc6b81
...
...
@@ -660,12 +660,12 @@
},{
"template"
:
[
"<div class='balloon' style='width: 200px; background-color: #3C3C3C; color: #FFFFFF;' id='myBalloon'>"
,
"<button class='infobtn'
onclick='
NoiseText()'></button>"
,
"<button class='infobtn'
id='infobtnNoise' onclick='setNoiseWaiting();
NoiseText()
;
'></button>"
,
" <h1 class='balloon-title' style='color: #FFFFFF;'>Noise Sensor</h1>"
,
" <div class='balloon-content' style='margin-right: 0px;'"
,
" </div>"
,
"<div class='box-3'>"
,
"<div class='btn btn-three' onclick='getNoiseData()'>"
,
"<div class='btn btn-three'
id='noiseStuff'
onclick='getNoiseData()
;SetNoiseDataWaiting()
'>"
,
"<span>Get Noise Data</span>"
,
"</div><br>"
,
"<br></div><br>"
,
...
...
vcm/css/loading.css
View file @
23cc6b81
...
...
@@ -7,6 +7,30 @@
-webkit-animation
:
spin
2s
linear
infinite
;
/* Safari */
animation
:
spin
2s
linear
infinite
;
}
.loaderN
{
border
:
2px
solid
#f3f3f3
;
border-radius
:
50%
;
border-top
:
2px
solid
#3498db
;
width
:
12px
;
height
:
12px
;
-webkit-animation
:
spin
2s
linear
infinite
;
/* Safari */
animation
:
spin
2s
linear
infinite
;
float
:
right
;
}
.LoaderNoise
{
border
:
8px
solid
rgb
(
88
,
88
,
88
);
border-radius
:
50%
;
border-top
:
8px
solid
#3498db
;
width
:
48px
;
height
:
48px
;
-webkit-animation
:
spin
2s
linear
infinite
;
/* Safari */
animation
:
spin
2s
linear
infinite
;
background-color
:
rgb
(
60
,
60
,
60
);
color
:
rgb
(
60
,
60
,
60
);
/* text-align:center; */
/* margin-top: 50%; */
margin-left
:
40%
;
}
/* Safari */
@-webkit-keyframes
spin
{
0
%
{
-webkit-transform
:
rotate
(
0deg
);
}
...
...
vcm/index.html
View file @
23cc6b81
...
...
@@ -658,13 +658,15 @@
<!-- <h1 class="sticky" id="headNoise">Lärmdaten</h1>
<br> -->
<h2>
Historical Noise Data
</h2>
<br>
<div
id=
"loadingHistNoise"
></div>
<!-- <p>The specific space heating demand wurde mit SimStadt simuliert. Die Werte sind in [kWh/m²·a] angegeben.</p><br>
<button onclick="HistNoiseData()">GetData</button>
<button onclick="showgraphNoise()">GetData</button> -->
<div
id=
"unconstrained"
></div><br>
<span
class=
"example-val"
id=
"unconstrained-values"
></span>
<div
style=
'width:100%;margin-top:
20
0px;'
id=
"chartNoise"
></div>
<div
style=
'width:100%;margin-top:
1
0px;'
id=
"chartNoise"
></div>
<!-- <div id="slider-color"></div> -->
</div>
<!-- ======================================================================================================================================================================== -->
...
...
@@ -723,6 +725,7 @@
<script
src=
"templates/slider.js"
></script>
<script
src=
"templates/UserBalloon.js"
></script>
<script
src=
"js/navigation.js"
></script>
<script
src=
"js/ServerorLocal.js"
></script>
<script
src=
"js/noise.js"
></script>
<link
href=
"templates/sliders.css"
rel=
"stylesheet"
>
<link
rel=
"stylesheet"
href=
"css/menu.css"
>
...
...
vcm/js/ServerorLocal.js
0 → 100644
View file @
23cc6b81
// Server
var
navPublicT
=
'
/partizipation/navPublicT
'
var
NavCARdata
=
'
/partizipation/NavCARdata
'
var
ROAD_CLOSURE
=
"
https://m4lab.hft-stuttgart.de/partizipation/ROAD_CLOSURE
"
var
CONSTRUCTION
=
"
https://m4lab.hft-stuttgart.de/partizipation/CONSTRUCTION
"
var
TrafficFlow
=
"
https://m4lab.hft-stuttgart.de/partizipation/TrafficFlow
"
var
NAVCAR
=
"
https://m4lab.hft-stuttgart.de/partizipation/NAVCAR
"
var
NAVPUB
=
"
https://m4lab.hft-stuttgart.de/partizipation/NAVPUB
"
var
addPointurl
=
"
https://m4lab.hft-stuttgart.de/partizipation/addPoint
"
var
routecalcurl
=
"
https://m4lab.hft-stuttgart.de/partizipation/Routecalc2
"
var
navpublict2url
=
"
https://m4lab.hft-stuttgart.de/partizipation/navPublicT2
"
var
StartpointUrl
=
"
https://m4lab.hft-stuttgart.de/partizipation/Startpoint
"
var
EndpointUrl
=
"
https://m4lab.hft-stuttgart.de/partizipation/Endpoint
"
var
FLOWdataUrl
=
"
/partizipation/FLOWdata
"
var
NavCARdataUrl
=
'
/partizipation/NavCARdata
'
var
FLOWtestUrl
=
'
/partizipation/FLOWtest
'
var
getTrafficIncidentsUrl
=
'
/partizipation/getTrafficIncidents
'
var
navPointUrl
=
'
/partizipation/navPoint
'
var
RoutecalcUrl
=
'
/partizipation/Routecalc
'
var
navPublicTUrl
=
'
/partizipation/navPublicT
'
var
NoiseRealTimeUrl
=
'
/partizipation/NoiseRealTime
'
var
getNoiseHistUrl
=
'
/partizipation/getNoiseHist
'
//_________________________________________/
// Local
// var navPublicT = '/navPublicT'
// var NavCARdata = '/NavCARdata'
// var ROAD_CLOSURE = "http://localhost:8083/ROAD_CLOSURE"
// var CONSTRUCTION = "http://localhost:8083/CONSTRUCTION"
// var TrafficFlow = "http://localhost:8083/TrafficFlow"
// var NAVCAR = "http://localhost:8083/NAVCAR"
// var NAVPUB = "http://localhost:8083/NAVPUB"
// var addPointurl = "http://localhost:8083/addPoint"
// var routecalcurl = "http://localhost:8083/Routecalc2"
// var navpublict2url = "http://localhost:8083/navPublicT2"
// var StartpointUrl = "http://localhost:8083/Startpoint"
// var EndpointUrl = "http://localhost:8083/Endpoint"
// var FLOWdataUrl = "/FLOWdata"
// var NavCARdataUrl = '/NavCARdata'
// var FLOWtestUrl = '/FLOWtest'
// var getTrafficIncidentsUrl = '/getTrafficIncidents'
// var navPointUrl = '/navPoint'
// var RoutecalcUrl = '/Routecalc'
// var navPublicTUrl = '/navPublicT'
// var NoiseRealTimeUrl = '/NoiseRealTime'
// var getNoiseHistUrl = '/getNoiseHist'
\ No newline at end of file
vcm/js/here.js
View file @
23cc6b81
...
...
@@ -13,7 +13,7 @@ function getNAVcar(){
try
{
$
.
ajax
({
type
:
"
POST
"
,
url
:
'
/partizipation/
NavCARdata
'
,
url
:
NavCARdata
,
}).
done
(
function
(
newdata
)
{
convertdata
(
newdata
);
});
...
...
@@ -32,7 +32,7 @@ catch (err) {
// var type = traffic.body.TRAFFIC_ITEMS.TRAFFIC_ITEM[0].TRAFFIC_ITEM_DESCRIPTION[0].value;
// roadclose = new vcs.vcm.layer.GeoJSON({
// name: "ROAD_CLOSURE",
//
url: "
http://localhost:8083/CONSTRUCTION",
// http://localhost:8083/CONSTRUCTION",
// data: geojson,
// projection: {
// epsg: 4326
...
...
@@ -62,7 +62,7 @@ function getAccidents(type){
if
(
type
==
"
ROAD_CLOSURE
"
){
roadclose
=
new
vcs
.
vcm
.
layer
.
GeoJSON
({
name
:
"
ROAD_CLOSURE
"
,
url
:
"
https://m4lab.hft-stuttgart.de/partizipation/
ROAD_CLOSURE
"
,
url
:
ROAD_CLOSURE
,
data
:
geojson
,
projection
:
{
epsg
:
4326
...
...
@@ -83,7 +83,7 @@ function getAccidents(type){
}
else
if
(
type
==
"
CONSTRUCTION
"
){
trafficlayer
=
new
vcs
.
vcm
.
layer
.
GeoJSON
({
name
:
"
CONSTRUCTION
"
,
url
:
"
https://m4lab.hft-stuttgart.de/partizipation/
CONSTRUCTION
"
,
url
:
CONSTRUCTION
,
data
:
geojson
,
projection
:
{
epsg
:
4326
...
...
@@ -141,7 +141,7 @@ function getFlow(){
try
{
$
.
ajax
({
type
:
"
POST
"
,
url
:
'
/partizipation/
FLOWdata
'
,
url
:
FLOWdata
Url
,
}).
done
(
function
(
newdata
)
{
convertdata
(
newdata
);
});
...
...
@@ -165,7 +165,7 @@ function getNAV(){
try
{
$
.
ajax
({
type
:
"
POST
"
,
url
:
'
/partizipation/
NavCARdata
'
,
url
:
NavCARdata
Url
,
}).
done
(
function
(
newdata
)
{
convertdata
(
newdata
);
});
...
...
@@ -189,7 +189,7 @@ function getFlowtest(){
try
{
$
.
ajax
({
type
:
"
POST
"
,
url
:
'
/partizipation/
FLOWtest
'
,
url
:
FLOWtest
Url
,
}).
done
(
function
(
newdata
)
{
convertdata
(
newdata
);
});
...
...
@@ -208,7 +208,7 @@ function drawFlow(){
// url: "http://localhost:8083/FLOW",
flowlayer
=
new
vcs
.
vcm
.
layer
.
GeoJSON
({
name
:
"
FLOW
"
,
url
:
"
https://m4lab.hft-stuttgart.de/partizipation/
TrafficFlow
"
,
url
:
TrafficFlow
,
data
:
geojson
,
projection
:
{
epsg
:
4326
...
...
@@ -244,7 +244,7 @@ function drawnavcar(){
framework
.
removeLayerByName
(
"
NAVCAR
"
)
navcarlayer
=
new
vcs
.
vcm
.
layer
.
GeoJSON
({
name
:
"
NAVCAR
"
,
url
:
"
https://m4lab.hft-stuttgart.de/partizipation/
NAVCAR
"
,
url
:
NAVCAR
,
data
:
geojson
,
projection
:
{
epsg
:
4326
...
...
@@ -259,7 +259,7 @@ function getTraffic() {
try
{
$
.
ajax
({
type
:
"
POST
"
,
url
:
'
/partizipation/
getTrafficIncidents
'
,
url
:
getTrafficIncidents
Url
,
}).
done
(
function
(
newdata
)
{
convertdata
(
newdata
);
});
...
...
@@ -286,7 +286,7 @@ function drawnavpub(){
framework
.
removeLayerByName
(
"
NAVPUB
"
)
navcarlayer
=
new
vcs
.
vcm
.
layer
.
GeoJSON
({
name
:
"
NAVPUB
"
,
url
:
"
https://m4lab.hft-stuttgart.de/partizipation/
NAVPUB
"
,
url
:
NAVPUB
,
data
:
geojson
,
projection
:
{
epsg
:
4326
...
...
@@ -326,7 +326,7 @@ function setPoint(location, pointd){
// visualizing with vcs GeoJson function
pointlayer
=
new
vcs
.
vcm
.
layer
.
GeoJSON
({
name
:
location
+
"
point
"
,
url
:
"
https://m4lab.hft-stuttgart.de/partizipation/
addPoint?slat=
"
+
pointd
.
lat
+
"
&slon=
"
+
pointd
.
lon
+
"
&sloc=
"
+
location
,
url
:
addPoint
url
+
"
?slat=
"
+
pointd
.
lat
+
"
&slon=
"
+
pointd
.
lon
+
"
&sloc=
"
+
location
,
data
:
geojson
,
projection
:
{
epsg
:
4326
...
...
@@ -385,7 +385,7 @@ function setRouteCar(){
// visualizing with vcs GeoJson function
pointlayer
=
new
vcs
.
vcm
.
layer
.
GeoJSON
({
name
:
"
CarRoute
"
,
url
:
"
https://m4lab.hft-stuttgart.de/partizipation/R
outecalc
2
?slat=
"
+
datapoint
.
slat
+
"
&slon=
"
+
datapoint
.
slon
+
"
&sloc=
"
+
datapoint
.
sloc
+
"
&elat=
"
+
datapoint
.
elat
+
"
&elon=
"
+
datapoint
.
elon
+
"
&eloc=
"
+
datapoint
.
eloc
,
url
:
r
outecalc
url
+
"
?slat=
"
+
datapoint
.
slat
+
"
&slon=
"
+
datapoint
.
slon
+
"
&sloc=
"
+
datapoint
.
sloc
+
"
&elat=
"
+
datapoint
.
elat
+
"
&elon=
"
+
datapoint
.
elon
+
"
&eloc=
"
+
datapoint
.
eloc
,
data
:
geojson
,
projection
:
{
epsg
:
4326
...
...
@@ -474,7 +474,7 @@ function setRoutePublic(){
// visualizing with vcs GeoJson function
pointlayer
=
new
vcs
.
vcm
.
layer
.
GeoJSON
({
name
:
"
PublicRoute
"
,
url
:
"
https://m4lab.hft-stuttgart.de/partizipation/
nav
P
ublic
T2
?slat=
"
+
datapoint
.
slat
+
"
&slon=
"
+
datapoint
.
slon
+
"
&sloc=
"
+
datapoint
.
sloc
+
"
&elat=
"
+
datapoint
.
elat
+
"
&elon=
"
+
datapoint
.
elon
+
"
&eloc=
"
+
datapoint
.
eloc
,
url
:
nav
p
ublic
t2url
+
"
?slat=
"
+
datapoint
.
slat
+
"
&slon=
"
+
datapoint
.
slon
+
"
&sloc=
"
+
datapoint
.
sloc
+
"
&elat=
"
+
datapoint
.
elat
+
"
&elon=
"
+
datapoint
.
elon
+
"
&eloc=
"
+
datapoint
.
eloc
,
data
:
testingThing
,
projection
:
{
epsg
:
4326
...
...
vcm/js/navigation.js
View file @
23cc6b81
...
...
@@ -17,7 +17,7 @@ function PostNavPoint(testing){
$
.
ajax
({
async
:
true
,
type
:
"
POST
"
,
url
:
'
/partizipation/
navPoint
'
,
url
:
navPoint
Url
,
data
:
point
}).
done
(
function
(
SimSMid
)
{
console
.
log
(
SimSMid
)
...
...
@@ -60,7 +60,7 @@ function showStartPoint(){
console
.
log
(
"
testStartpointvis
"
)
Startpointlayer
=
new
vcs
.
vcm
.
layer
.
GeoJSON
({
name
:
"
Startpoint
"
,
url
:
"
http://localhost:8083/
Startpoint
"
,
url
:
Startpoint
Url
,
data
:
geojson
,
projection
:
{
epsg
:
4326
...
...
@@ -93,7 +93,7 @@ function showEndPoint(){
// console.log("testStartpointvis")
Endpointlayer
=
new
vcs
.
vcm
.
layer
.
GeoJSON
({
name
:
"
EndpointNav
"
,
url
:
"
http://localhost:8083/
Endpoint
"
,
url
:
Endpoint
Url
,
data
:
geojson
,
projection
:
{
epsg
:
4326
...
...
@@ -135,7 +135,7 @@ function showRoute(){
$
.
ajax
({
async
:
true
,
type
:
"
POST
"
,
url
:
'
/partizipation/
Routecalc
'
,
url
:
Routecalc
Url
,
data
:
datapointSend
}).
done
(
function
(
SimSMid
)
{
console
.
log
(
SimSMid
)
...
...
@@ -167,7 +167,7 @@ function showRoute(){
$
.
ajax
({
async
:
true
,
type
:
"
POST
"
,
url
:
'
/partizipation/
navPublicT
'
,
url
:
navPublicT
Url
,
data
:
datapointSend
}).
done
(
function
(
SimSMid
)
{
console
.
log
(
SimSMid
)
...
...
@@ -223,7 +223,7 @@ function publictransport(){
$
.
ajax
({
async
:
true
,
type
:
"
get
"
,
url
:
'
/partizipation/
navPublicT
'
,
url
:
navPublicT
Url
,
data
:
datapointSend
}).
done
(
function
(
SimSMid
)
{
console
.
log
(
SimSMid
)
...
...
vcm/js/noise.js
View file @
23cc6b81
function
SetNoiseDataWaiting
(){
var
resetBtn
=
document
.
getElementById
(
"
noiseStuff
"
);
resetBtn
.
disabled
=
true
;
resetBtn
.
innerHTML
=
'
<div id="loaderCar" class="LoaderNoise"></div>
'
}
function
setNoiseWaiting
(){
document
.
getElementById
(
"
infobtnNoise
"
).
classList
.
add
(
'
loaderN
'
);
console
.
log
(
"
arrived
"
)
document
.
getElementById
(
"
infobtnNoise
"
).
classList
.
remove
(
'
infobtn
'
);
// var resetBtn = document.getElementById("infobtnNoise");
// resetBtn.disabled = true;
// resetBtn.innerHTML = '<div id="loaderCartest" class="loaderN"></div>'
}
function
getNoiseData
()
{
try
{
$
.
ajax
({
type
:
"
GET
"
,
url
:
'
/partizipation/
NoiseRealTime
'
,
url
:
NoiseRealTime
Url
,
}).
done
(
function
(
newdata
)
{
convertdata
(
newdata
);
});
...
...
@@ -21,8 +32,14 @@ function getNoiseData() {
document
.
getElementById
(
"
noise_lamax
"
).
innerHTML
=
flow
[
0
].
sensordatavalues
[
i
].
value
;
}
}
var
resetBtn
=
document
.
getElementById
(
"
noiseStuff
"
);
resetBtn
.
disabled
=
true
;
resetBtn
.
innerHTML
=
"
<span>Get Noise Data</span>
"
}
return
flow
}
catch
(
err
)
{
console
.
log
(
'
loading Gas Values from DB failed!
'
);
...
...
@@ -103,13 +120,15 @@ function noisesens(status){
let
histNoise
function
HistNoiseData
()
{
try
{
$
.
ajax
({
async
:
fals
e
,
async
:
tru
e
,
type
:
"
POST
"
,
url
:
'
/partizipation/
getNoiseHist
'
,
url
:
getNoiseHist
Url
,
data
:
""
,
}).
done
(
function
(
histwinddata
)
{
convertdata
(
histwinddata
);
...
...
@@ -266,6 +285,9 @@ function showgraphNoise(){
document
.
getElementById
(
"
chartNoise
"
).
innerHTML
=
""
;
var
chart
=
new
ApexCharts
(
document
.
querySelector
(
"
#chartNoise
"
),
options
);
document
.
getElementById
(
"
infobtnNoise
"
).
classList
.
add
(
'
infobtn
'
);
document
.
getElementById
(
"
infobtnNoise
"
).
classList
.
remove
(
'
loaderN
'
);
console
.
log
(
"
end
"
)
chart
.
render
();
}
...
...
vcm/templates/custom.js
View file @
23cc6b81
...
...
@@ -258,8 +258,8 @@ function NoiseText() {
document
.
getElementById
(
"
Navigation
"
).
style
.
display
=
"
none
"
;
document
.
getElementById
(
"
NordbahnhofInfo
"
).
style
.
display
=
"
none
"
;
document
.
getElementById
(
"
NoiseInfo
"
).
style
.
display
=
"
block
"
;
showTour
();
HistNoiseData
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment