Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
c6490291
Commit
c6490291
authored
Oct 06, 2022
by
Eric Duminil
Browse files
Slowly trying to replace jquery
parent
7ea7f80a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
View file @
c6490291
...
...
@@ -14,7 +14,7 @@ var regionChooser = (function(){
}
if
(
fromJavaFX
){
$
(
"
html
"
).
addClass
(
"
wait
"
)
;
document
.
documentElement
.
className
=
'
wait
'
;
}
var
osm_layer
=
new
ol
.
layer
.
Tile
({
...
...
@@ -226,7 +226,7 @@ var regionChooser = (function(){
setTimeout
(
function
()
{
var
start
=
new
Date
().
getTime
();
if
(
proj4
.
defs
(
srsName
)){
$
(
"
html
"
).
addClass
(
"
wait
"
)
;
document
.
documentElement
.
className
=
'
wait
'
;
console
.
log
(
"
Selected region is written in
"
+
srsName
+
"
coordinate system.
"
);
try
{
fxapp
.
downloadRegionFromCityGMLs
(
sketchAsWKT
(
srsName
),
project
,
citygmlNames
.
join
(
"
;
"
),
srsName
);
...
...
@@ -239,7 +239,7 @@ var regionChooser = (function(){
var
time
=
end
-
start
;
console
.
log
(
'
Download Execution time:
'
+
(
time
/
1000
).
toFixed
(
3
)
+
'
s
'
);
setTimeout
(
function
()
{
$
(
"
html
"
).
removeClass
(
"
wait
"
);
document
.
documentElement
.
className
=
''
;
// Stop
wait
ing
},
100
);
}
else
{
var
msg
=
"
ERROR : Unknown coordinate system :
\"
"
+
srsName
+
"
\"
. Cannot extract any region
"
;
...
...
@@ -295,7 +295,7 @@ var regionChooser = (function(){
draw
.
finishDrawing
();
}
finally
{
displayHelp
();
$
(
"
html
"
).
removeClass
(
"
wait
"
);
document
.
documentElement
.
className
=
''
;
// Stop
wait
ing
draw
.
setActive
(
true
);
featureOverlay
.
getFeatures
().
clear
();
intersections
.
clear
();
...
...
@@ -313,7 +313,7 @@ var regionChooser = (function(){
}
function
focusOnMap
()
{
$
(
'
#
map
'
).
focus
();
document
.
getElementById
(
"
map
"
).
focus
();
}
var
fxapp
=
undefined
;
...
...
@@ -346,13 +346,16 @@ var regionChooser = (function(){
dataPanel
.
append
(
"
After drawing a polygon which intersects with at least one GML file,<br>
\n
"
);
dataPanel
.
append
(
"
you can download the corresponding part by checking the<br>
\n
"
);
dataPanel
.
append
(
"
desired filenames and clicking on 'Download' button.<br>
\n
"
);
dataPanel
.
append
(
"
<br>
\n
"
);
dataPanel
.
append
(
"
More info is available in the
"
);
dataPanel
.
append
(
"
<a href='http://simstadt.hft-stuttgart.de/related-softwares/region-chooser/'>SimStadt documentation</a><br>
\n
"
);
}
// Executed by JavaFX when whole page is loaded.
publicScope
.
ready
=
function
()
{
updateGMLPolygons
();
displayHelp
();
$
(
"
html
"
).
removeClass
(
"
wait
"
);
document
.
documentElement
.
className
=
''
;
// Stop
wait
ing
console
.
log
(
"
READY!
"
);
}
...
...
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