Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SimStadt
3DClient4SimStadtAPI
Commits
e238b100
Commit
e238b100
authored
Nov 11, 2021
by
BujarMuharemi
Browse files
small fixes
parent
aabf5e17
Changes
3
Hide whitespace changes
Inline
Side-by-side
public/js/connectToAPI.js
View file @
e238b100
var
coordinatesBB
=
[]
var
coordinatesBB
=
[]
var
url
=
"
https://simstadt-api.iaf-ex.hft-stuttgart.de:8080/workflow/execute
"
//var url = "https://simstadt-api.iaf-ex.hft-stuttgart.de:8080/workflow/execute" //old link
var
url
=
"
http://vm24.fkc.hft-stuttgart.de:8080/workflow/execute
"
var
buildingFunctionSort
var
buildingFunctionSort
var
constructionYearSortPick
var
constructionYearSortPick
...
@@ -25,7 +27,7 @@ async function fetchDataJSON() {
...
@@ -25,7 +27,7 @@ async function fetchDataJSON() {
"
rightLng
"
:
rightLng
,
//9.175336684,
"
rightLng
"
:
rightLng
,
//9.175336684,
"
topLat
"
:
topLat
//48.7822869656
"
topLat
"
:
topLat
//48.7822869656
},
},
//
"cityGMLRef": "campus",
"
cityGMLRef
"
:
"
campus
LOD2
"
,
"
interestedAttributes
"
:
[
"
interestedAttributes
"
:
[
"
uValue
"
,
"
uValue
"
,
"
volume
"
,
"
volume
"
,
...
...
public/js/globe.js
View file @
e238b100
Cesium
.
Ion
.
defaultAccessToken
=
'
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjNjM5YzFjNC03NWNmLTQ2M2YtOWJiNC0xODNmMTY2ZjkwNTkiLCJpZCI6MzY3NjEsImlhdCI6MTYwMzk4NTU3Nn0.G3fnwzZ50towP1Nv9goyvu0JxJW5GtiudTR7X67Zo84
'
;
Cesium
.
Ion
.
defaultAccessToken
=
'
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjNjM5YzFjNC03NWNmLTQ2M2YtOWJiNC0xODNmMTY2ZjkwNTkiLCJpZCI6MzY3NjEsImlhdCI6MTYwMzk4NTU3Nn0.G3fnwzZ50towP1Nv9goyvu0JxJW5GtiudTR7X67Zo84
'
;
var
roofTiles
=
[
"
PolyIDGeo755601
"
,
"
PolyIDGeo787622
"
,
"
PolyIDGeo135906
"
,
"
PolyIDGeo534180
"
,
"
PolyIDGeo1597157
"
,
"
PolyIDGeo1628130
"
,
"
PolyIDGeo570789
"
,
"
PolyIDGeo206785
"
,
"
PolyIDGeo785307
"
,
"
PolyIDGeo1096586
"
,
"
PolyIDGeo25714307
"
,
"
PolyIDGeo772461
"
,
"
PolyIDGeo25430590
"
];
var
viewer
=
new
Cesium
.
Viewer
(
'
cesiumContainer
'
,
{
var
viewer
=
new
Cesium
.
Viewer
(
'
cesiumContainer
'
,
{
homeButton
:
false
,
homeButton
:
false
,
baseLayerPicker
:
false
,
baseLayerPicker
:
false
,
navigationHelpButton
:
false
,
navigationHelpButton
:
false
,
timeline
:
fals
e
,
timeline
:
tru
e
,
animation
:
false
,
animation
:
false
,
sceneModePicker
:
false
,
sceneModePicker
:
false
,
geocoder
:
false
,
geocoder
:
false
,
...
@@ -137,6 +140,35 @@ viewer.screenSpaceEventHandler.setInputAction(function onMouseMove(movement) {
...
@@ -137,6 +140,35 @@ viewer.screenSpaceEventHandler.setInputAction(function onMouseMove(movement) {
}
}
}
}
//TODO: add roof selection
else
if
(
document
.
getElementById
(
"
roof
"
).
checked
){
tileContent
.
forEach
(
t
=>
{
if
(
t
===
pickedFeature
)
{
console
.
log
(
t
.
getProperty
(
"
gml_id
"
));
console
.
log
(
t
);
}
roofTiles
.
forEach
(
rt
=>
{
if
(
t
.
getProperty
(
"
gml_id
"
)
===
rt
){
var
a
=
Math
.
floor
(
Math
.
random
()
*
3
);
if
(
a
==
1
){
t
.
color
=
Cesium
.
Color
.
RED
;
}
else
if
(
0
){
t
.
color
=
Cesium
.
Color
.
YELLOW
;
}
else
{
t
.
color
=
Cesium
.
Color
.
GREEN
;
}
}
})
});
}
else
{
else
{
// A feature was picked, so show it's overlay content
// A feature was picked, so show it's overlay content
...
...
public/main.html
View file @
e238b100
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
</style>
</style>
<script
src=
"https://code.jquery.com/jquery-3.3.1.min.js"
></script>
<script
src=
"https://code.jquery.com/jquery-3.3.1.min.js"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js"
integrity=
"sha512-AA1Bzp5Q0K1KanKKmvN/4d3IRKVlv9PYgwFPvm32nPO6QS8yH1HO7LbgB1pgiOxPtfeg5zEn2ba64MUcqJx6CA=="
crossorigin=
"anonymous"
referrerpolicy=
"no-referrer"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js"
integrity=
"sha512-AA1Bzp5Q0K1KanKKmvN/4d3IRKVlv9PYgwFPvm32nPO6QS8yH1HO7LbgB1pgiOxPtfeg5zEn2ba64MUcqJx6CA=="
crossorigin=
"anonymous"
referrerpolicy=
"no-referrer"
></script>
<!-- TODO: maybe add this to a external js file -->
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
var
arrLang
=
{
var
arrLang
=
{
'
en
'
:
{
'
en
'
:
{
...
@@ -211,7 +212,7 @@
...
@@ -211,7 +212,7 @@
</div>
</div>
<div
class=
"hilfe"
>
<div
class=
"hilfe"
>
<p>
<a
href=
"/
public/
pdf/Benutzerhandbuch.pdf"
target=
"_blank"
><button
class=
"lang"
id=
"Handbuch"
key=
"userguide"
>
User Guide
</button></a></p>
<p>
<a
href=
"/pdf/Benutzerhandbuch.pdf"
target=
"_blank"
><button
class=
"lang"
id=
"Handbuch"
key=
"userguide"
>
User Guide
</button></a></p>
</div>
</div>
<!--Sidebar-->
<!--Sidebar-->
...
@@ -244,6 +245,11 @@
...
@@ -244,6 +245,11 @@
<input
id=
"surface"
type=
"radio"
name=
"credit-card"
value=
"surface"
>
<input
id=
"surface"
type=
"radio"
name=
"credit-card"
value=
"surface"
>
<div
class=
"lang"
key=
"surfaceview"
>
Surface-View
</div>
<div
class=
"lang"
key=
"surfaceview"
>
Surface-View
</div>
<label
class=
"drinkcard-cc surface"
for=
"surface"
></label>
<label
class=
"drinkcard-cc surface"
for=
"surface"
></label>
<input
id=
"roof"
type=
"radio"
name=
"credit-card"
value=
"roof"
>
<div
class=
"lang"
key=
"roofview"
>
Roof-View
</div>
<label
class=
"drinkcard-cc surface"
for=
"roof"
></label>
</div>
</div>
</div>
</div>
<!--Chartbutton-->
<!--Chartbutton-->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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