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
e6f8f6c9
Commit
e6f8f6c9
authored
Mar 08, 2018
by
Eric Duminil
Browse files
RegionChooser: fxapp as private attribute.
parent
14e8c601
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/eu/simstadt/regionchooser/RegionChooserBrowser.java
View file @
e6f8f6c9
...
@@ -193,7 +193,7 @@ public RegionChooserBrowser() {
...
@@ -193,7 +193,7 @@ public RegionChooserBrowser() {
(
ObservableValue
<?
extends
State
>
ov
,
State
oldState
,
State
newState
)
->
{
(
ObservableValue
<?
extends
State
>
ov
,
State
oldState
,
State
newState
)
->
{
if
(
newState
==
State
.
SUCCEEDED
)
{
if
(
newState
==
State
.
SUCCEEDED
)
{
JSObject
regionChooserJS
=
(
JSObject
)
webEngine
.
executeScript
(
"regionChooser"
);
JSObject
regionChooserJS
=
(
JSObject
)
webEngine
.
executeScript
(
"regionChooser"
);
regionChooserJS
.
setMember
(
"fxa
pp"
,
fxapp
);
regionChooserJS
.
call
(
"setFxA
pp"
,
fxapp
);
regionChooserJS
.
call
(
"ready"
);
regionChooserJS
.
call
(
"ready"
);
try
{
try
{
fxapp
.
importNovaFactoryBoundingBoxes
();
fxapp
.
importNovaFactoryBoundingBoxes
();
...
...
src/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
View file @
e6f8f6c9
...
@@ -104,7 +104,7 @@ var regionChooser = (function(){
...
@@ -104,7 +104,7 @@ var regionChooser = (function(){
feature
[
"
source
"
]
=
"
CityGML
"
;
feature
[
"
source
"
]
=
"
CityGML
"
;
var
citygmlHere
;
var
citygmlHere
;
if
(
fromJavaFX
)
{
if
(
fromJavaFX
)
{
citygmlHere
=
publicScope
.
fxapp
.
checkIfCityGMLSAreAvailable
(
project
,
name
);
citygmlHere
=
fxapp
.
checkIfCityGMLSAreAvailable
(
project
,
name
);
}
}
feature
[
"
available
"
]
=
citygmlHere
;
feature
[
"
available
"
]
=
citygmlHere
;
});
});
...
@@ -228,7 +228,7 @@ var regionChooser = (function(){
...
@@ -228,7 +228,7 @@ var regionChooser = (function(){
if
(
proj4
.
defs
(
srsName
)){
if
(
proj4
.
defs
(
srsName
)){
$
(
"
html
"
).
addClass
(
"
wait
"
);
$
(
"
html
"
).
addClass
(
"
wait
"
);
console
.
log
(
"
Selected region is written in
"
+
srsName
+
"
coordinate system.
"
);
console
.
log
(
"
Selected region is written in
"
+
srsName
+
"
coordinate system.
"
);
publicScope
.
fxapp
.
downloadRegionFromCityGML
(
sketchAsWKT
(
srsName
),
feature
.
get
(
"
project
"
),
feature
.
get
(
"
name
"
),
srsName
);
fxapp
.
downloadRegionFromCityGML
(
sketchAsWKT
(
srsName
),
feature
.
get
(
"
project
"
),
feature
.
get
(
"
name
"
),
srsName
);
var
end
=
new
Date
().
getTime
();
var
end
=
new
Date
().
getTime
();
var
time
=
end
-
start
;
var
time
=
end
-
start
;
console
.
log
(
'
DL Execution time:
'
+
time
);
console
.
log
(
'
DL Execution time:
'
+
time
);
...
@@ -306,7 +306,7 @@ var regionChooser = (function(){
...
@@ -306,7 +306,7 @@ var regionChooser = (function(){
};
};
novafactory_layer
.
selectSaveFile
=
function
(
zipFilename
)
{
novafactory_layer
.
selectSaveFile
=
function
(
zipFilename
)
{
publicScope
.
fxapp
.
extractZIPtoGML
(
zipFilename
);
fxapp
.
extractZIPtoGML
(
zipFilename
);
};
};
publicScope
.
downloadRegionFromNovaFACTORY
=
function
(
i
)
{
publicScope
.
downloadRegionFromNovaFACTORY
=
function
(
i
)
{
...
@@ -314,7 +314,7 @@ var regionChooser = (function(){
...
@@ -314,7 +314,7 @@ var regionChooser = (function(){
var
feature
=
novafactory_vectors
.
getFeatures
()[
i
];
var
feature
=
novafactory_vectors
.
getFeatures
()[
i
];
// Waiting 100ms in order to let the cursor change
// Waiting 100ms in order to let the cursor change
setTimeout
(
function
()
{
setTimeout
(
function
()
{
publicScope
.
fxapp
.
downloadRegion
(
sketchAsWKT
(),
feature
.
get
(
'
name
'
),
novafactory_layer
);
fxapp
.
downloadRegion
(
sketchAsWKT
(),
feature
.
get
(
'
name
'
),
novafactory_layer
);
},
100
);
},
100
);
}
}
...
@@ -326,19 +326,23 @@ var regionChooser = (function(){
...
@@ -326,19 +326,23 @@ var regionChooser = (function(){
featureProjection
:
ol
.
proj
.
get
(
'
EPSG:3857
'
)
featureProjection
:
ol
.
proj
.
get
(
'
EPSG:3857
'
)
});
});
}
}
function
focusOnMap
()
{
function
focusOnMap
()
{
$
(
'
#map
'
).
focus
();
$
(
'
#map
'
).
focus
();
// $('#map').scrollIntoView();
// $('#map').scrollIntoView();
}
}
publicScope
.
fxapp
=
undefined
;
var
fxapp
=
undefined
;
publicScope
.
setFxApp
=
function
(
app
){
fxapp
=
app
;
}
// Executed by JavaFX when whole page is loaded.
// Executed by JavaFX when whole page is loaded.
publicScope
.
ready
=
function
()
{
publicScope
.
ready
=
function
()
{
fromJavaFX
=
true
;
fromJavaFX
=
true
;
console
.
log
=
function
(
message
){
console
.
log
=
function
(
message
){
publicScope
.
fxapp
.
log
(
message
);
fxapp
.
log
(
message
);
}
}
console
.
log
(
"
READY!
"
);
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