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
c6490291
Commit
c6490291
authored
2 years ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
Slowly trying to replace jquery
parent
7ea7f80a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+9
-6
...stadt/regionchooser/website/script/simstadt_openlayers.js
with
9 additions
and
6 deletions
+9
-6
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+
9
-
6
View file @
c6490291
...
@@ -14,7 +14,7 @@ var regionChooser = (function(){
...
@@ -14,7 +14,7 @@ var regionChooser = (function(){
}
}
if
(
fromJavaFX
){
if
(
fromJavaFX
){
$
(
"
html
"
).
addClass
(
"
wait
"
)
;
document
.
documentElement
.
className
=
'
wait
'
;
}
}
var
osm_layer
=
new
ol
.
layer
.
Tile
({
var
osm_layer
=
new
ol
.
layer
.
Tile
({
...
@@ -226,7 +226,7 @@ var regionChooser = (function(){
...
@@ -226,7 +226,7 @@ var regionChooser = (function(){
setTimeout
(
function
()
{
setTimeout
(
function
()
{
var
start
=
new
Date
().
getTime
();
var
start
=
new
Date
().
getTime
();
if
(
proj4
.
defs
(
srsName
)){
if
(
proj4
.
defs
(
srsName
)){
$
(
"
html
"
).
addClass
(
"
wait
"
)
;
document
.
documentElement
.
className
=
'
wait
'
;
console
.
log
(
"
Selected region is written in
"
+
srsName
+
"
coordinate system.
"
);
console
.
log
(
"
Selected region is written in
"
+
srsName
+
"
coordinate system.
"
);
try
{
try
{
fxapp
.
downloadRegionFromCityGMLs
(
sketchAsWKT
(
srsName
),
project
,
citygmlNames
.
join
(
"
;
"
),
srsName
);
fxapp
.
downloadRegionFromCityGMLs
(
sketchAsWKT
(
srsName
),
project
,
citygmlNames
.
join
(
"
;
"
),
srsName
);
...
@@ -239,7 +239,7 @@ var regionChooser = (function(){
...
@@ -239,7 +239,7 @@ var regionChooser = (function(){
var
time
=
end
-
start
;
var
time
=
end
-
start
;
console
.
log
(
'
Download Execution time:
'
+
(
time
/
1000
).
toFixed
(
3
)
+
'
s
'
);
console
.
log
(
'
Download Execution time:
'
+
(
time
/
1000
).
toFixed
(
3
)
+
'
s
'
);
setTimeout
(
function
()
{
setTimeout
(
function
()
{
$
(
"
html
"
).
removeClass
(
"
wait
"
);
document
.
documentElement
.
className
=
''
;
// Stop
wait
ing
},
100
);
},
100
);
}
else
{
}
else
{
var
msg
=
"
ERROR : Unknown coordinate system :
\"
"
+
srsName
+
"
\"
. Cannot extract any region
"
;
var
msg
=
"
ERROR : Unknown coordinate system :
\"
"
+
srsName
+
"
\"
. Cannot extract any region
"
;
...
@@ -295,7 +295,7 @@ var regionChooser = (function(){
...
@@ -295,7 +295,7 @@ var regionChooser = (function(){
draw
.
finishDrawing
();
draw
.
finishDrawing
();
}
finally
{
}
finally
{
displayHelp
();
displayHelp
();
$
(
"
html
"
).
removeClass
(
"
wait
"
);
document
.
documentElement
.
className
=
''
;
// Stop
wait
ing
draw
.
setActive
(
true
);
draw
.
setActive
(
true
);
featureOverlay
.
getFeatures
().
clear
();
featureOverlay
.
getFeatures
().
clear
();
intersections
.
clear
();
intersections
.
clear
();
...
@@ -313,7 +313,7 @@ var regionChooser = (function(){
...
@@ -313,7 +313,7 @@ var regionChooser = (function(){
}
}
function
focusOnMap
()
{
function
focusOnMap
()
{
$
(
'
#
map
'
).
focus
();
document
.
getElementById
(
"
map
"
).
focus
();
}
}
var
fxapp
=
undefined
;
var
fxapp
=
undefined
;
...
@@ -346,13 +346,16 @@ var regionChooser = (function(){
...
@@ -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
(
"
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
(
"
you can download the corresponding part by checking the<br>
\n
"
);
dataPanel
.
append
(
"
desired filenames and clicking on 'Download' button.<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.
// Executed by JavaFX when whole page is loaded.
publicScope
.
ready
=
function
()
{
publicScope
.
ready
=
function
()
{
updateGMLPolygons
();
updateGMLPolygons
();
displayHelp
();
displayHelp
();
$
(
"
html
"
).
removeClass
(
"
wait
"
);
document
.
documentElement
.
className
=
''
;
// Stop
wait
ing
console
.
log
(
"
READY!
"
);
console
.
log
(
"
READY!
"
);
}
}
...
...
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