Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SimStadt
3DClient4SimStadtAPI
Commits
889155dd
Commit
889155dd
authored
Nov 29, 2021
by
Izairi
Browse files
showing shadowdata of clicksurface
parent
5f7d44be
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/js/connectToAPI.js
View file @
889155dd
...
...
@@ -14,7 +14,7 @@ var heatedVolumeSortPick
var
totalSurfaceAreaSortPick
var
roofTypeSortPick
var
uValueSortPick
var
shadowdata
async
function
fetchshadowDataJSON
()
{
var
bottomLat
=
coordinatesBB
[
1
]
...
...
@@ -99,7 +99,8 @@ function processData() {
timeout
(
25000
,
fetchshadowDataJSON
()).
then
((
response
)
=>
{
console
.
log
(
response
)
console
.
log
(
response
)
shadowdata
=
response
;
}).
catch
((
error
)
=>
{
//catching the error(no connection)/ timeout and displaying an alert for the user
swal
({
text
:
"
Could not connect to Server. Using now: local data
"
,
icon
:
"
info
"
}
);
...
...
@@ -336,7 +337,9 @@ window.onclick = function (event) {
//-------------------------------------------------------------------------------
var
tileData
=
null
;
var
tileset
=
null
;
var
tilesetURL
=
'
http://vm24.fkc.hft-stuttgart.de:8081/CampusLOD2Old/tileset.json
'
;
//var tilesetURL = 'http://vm24.fkc.hft-stuttgart.de:8081/CampusLOD2Old/tileset.json';
var
tilesetURL
=
'
http://vm24.fkc.hft-stuttgart.de:8081/CampusLOD2/tileset.json
'
;
var
localTestTileset
=
'
/3dclient4simstadtapi/public/test/gmlTileset_v1.json
'
;
...
...
public/js/globe.js
View file @
889155dd
...
...
@@ -138,7 +138,11 @@ viewer.screenSpaceEventHandler.setInputAction(function onMouseMove(movement) {
//debugging - getting all info of the clicked surface
//console.log(t.getPropertyNames());
console
.
log
(
t
.
getProperty
(
"
description
"
)
+
"
\n
"
+
t
.
getProperty
(
"
feature_type
"
)
+
"
\n
"
+
t
.
getProperty
(
"
gml_id
"
)
+
"
\n
"
+
t
.
getProperty
(
"
gml_parent_id
"
));
for
(
const
[
key
,
value
]
of
Object
.
entries
(
shadowdata
))
{
if
(
key
===
t
.
getProperty
(
"
gml_id
"
)){
console
.
log
(
key
,
value
);
}
}
}
});
}
...
...
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