Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
OGC
dojo-3DPS-client
Commits
b5d56edb
Commit
b5d56edb
authored
Apr 17, 2020
by
Athanasios
Browse files
bug fix
parent
03780bf6
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/helpers/RequestWrapper.js
View file @
b5d56edb
...
...
@@ -34,7 +34,7 @@ define([
StatusBar
.
beginProcess
(
"
Waiting for response
"
);
request
(
url
,
{
handleAs
:
"
json
"
})
.
then
(
function
(
portrayalNodes
)
{
.
then
(
async
(
portrayalNodes
)
=>
{
if
(
portrayalNodes
.
length
==
0
)
{
NodeCache
.
clearAll
();
...
...
@@ -47,19 +47,22 @@ define([
if
(
requestTime
<
CameraChangeEvent
.
getTime
())
return
;
let
responseIds
=
portrayalNodes
.
map
(
n
=>
{
return
n
.
id
;
});
NodeCache
.
matchAll
(
responseIds
);
let
mapper
=
new
CesiumMapper
();
StatusBar
.
beginProcess
(
"
Processing
"
);
try
{
portrayalNodes
.
forEach
(
async
(
node
)
=>
{
if
(
requestTime
<
CameraChangeEvent
.
getTime
())
throw
BreakException
;
if
(
!
NodeCache
.
contains
(
node
.
id
))
{
let
instances
=
await
mapper
.
map
(
node
);
NodeCache
.
add
(
instances
,
node
);
}
});
await
Promise
.
all
(
portrayalNodes
.
map
(
async
(
node
)
=>
{
if
(
requestTime
<
CameraChangeEvent
.
getTime
())
throw
BreakException
;
if
(
!
NodeCache
.
contains
(
node
.
id
))
{
let
instances
=
await
mapper
.
map
(
node
);
await
NodeCache
.
add
(
instances
,
node
);
}
})
);
StatusBar
.
endProcess
();
topic
.
publish
(
"
PortrayalResponseHandled
"
,
"
SceneRendered
"
);
...
...
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