Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
48f9e849
Commit
48f9e849
authored
2 years ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
slight refactor.
parent
c1c38a9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+5
-7
...stadt/regionchooser/website/script/simstadt_openlayers.js
with
5 additions
and
7 deletions
+5
-7
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+
5
-
7
View file @
48f9e849
...
...
@@ -234,12 +234,13 @@ var regionChooser = (function(){
dataPanel
.
prepend
(
"
<h2 class='error'>Sorry, the CityGML files should all be written with the same coordinate system.</h2><br/>
\n
"
);
}
document
.
documentElement
.
className
=
'
wait
'
;
var
citygmlNames
=
features
.
map
(
f
=>
f
.
get
(
"
name
"
));
// Waiting 100ms in order to let the cursor change
setTimeout
(
function
()
{
var
start
=
new
Date
().
getTime
();
if
(
proj4
.
defs
(
srsName
)){
document
.
documentElement
.
className
=
'
wait
'
;
console
.
log
(
"
Selected region is written in
"
+
srsName
+
"
coordinate system.
"
);
try
{
fxapp
.
downloadRegionFromCityGMLs
(
sketchAsWKT
(
srsName
),
project
,
citygmlNames
.
join
(
"
;
"
),
srsName
);
...
...
@@ -374,13 +375,10 @@ var regionChooser = (function(){
}
publicScope
.
downloadFromSelectedCityGMLs
=
function
()
{
document
.
getElementById
(
"
download_region_button
"
).
disabled
=
true
;
var
checkedBoxes
=
Array
.
from
(
document
.
querySelectorAll
(
"
input.select_citygml
"
)).
filter
(
c
=>
c
.
checked
);
if
(
checkedBoxes
.
length
===
0
){
console
.
log
(
"
You should select at least one citygml, though.
"
);
}
else
{
document
.
getElementById
(
"
download_region_button
"
).
disabled
=
true
;
publicScope
.
downloadRegionFromCityGMLs
(
checkedBoxes
.
map
(
c
=>
c
.
id
));
}
// CheckBoxes isn't empty, because otherwise the button cannot be clicked.
publicScope
.
downloadRegionFromCityGMLs
(
checkedBoxes
.
map
(
c
=>
c
.
id
));
}
publicScope
.
checkCityGMLS
=
function
(
allOrNone
)
{
...
...
This diff is collapsed.
Click to expand it.
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