Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
2eb7a48c
Commit
2eb7a48c
authored
10 years ago
by
duminil
Browse files
Options
Download
Email Patches
Plain Diff
RegionChooser: Cleaning up
parent
29d11660
master
develop
migrate_to_Java11
0.2.2
0.1.0
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
src/eu/simstadt/nf4j/ExportJobFromJavaFXRegionChooser.java
+1
-1
src/eu/simstadt/nf4j/ExportJobFromJavaFXRegionChooser.java
src/eu/simstadt/regionchooser/RegionChooserFX.java
+6
-3
src/eu/simstadt/regionchooser/RegionChooserFX.java
website/index.html
+23
-27
website/index.html
website/script/simstadt_openlayers.js
+0
-1
website/script/simstadt_openlayers.js
website/style/style.css
+8
-2
website/style/style.css
with
38 additions
and
34 deletions
+38
-34
src/eu/simstadt/nf4j/ExportJobFromJavaFXRegionChooser.java
+
1
-
1
View file @
2eb7a48c
...
@@ -70,7 +70,7 @@ public void processJob(Geometry poly, String productName, JSObject novaFactoryOp
...
@@ -70,7 +70,7 @@ public void processJob(Geometry poly, String productName, JSObject novaFactoryOp
@Override
@Override
public
void
jobStatusChanged
(
JobStatusEvent
event
)
{
public
void
jobStatusChanged
(
JobStatusEvent
event
)
{
JobStatus
status
=
(
JobStatus
)
event
.
getSource
();
JobStatus
status
=
(
JobStatus
)
event
.
getSource
();
System
.
out
.
println
(
status
);
//
System.out.println(status);
if
(
status
==
JobStatus
.
LOCAL
)
{
if
(
status
==
JobStatus
.
LOCAL
)
{
novaFactoryOpenLayer
.
call
(
"updateStatus"
,
"REQUEST HAS BEEN PREPARED"
);
novaFactoryOpenLayer
.
call
(
"updateStatus"
,
"REQUEST HAS BEEN PREPARED"
);
}
else
if
(
status
==
JobStatus
.
SENT
)
{
}
else
if
(
status
==
JobStatus
.
SENT
)
{
...
...
This diff is collapsed.
Click to expand it.
src/eu/simstadt/regionchooser/RegionChooserFX.java
+
6
-
3
View file @
2eb7a48c
...
@@ -97,13 +97,16 @@ protected Integer call() throws Exception {
...
@@ -97,13 +97,16 @@ protected Integer call() throws Exception {
public
void
extractZIPtoGML
(
String
zipFilename
)
throws
IOException
{
public
void
extractZIPtoGML
(
String
zipFilename
)
throws
IOException
{
ZipFile
zipFile
=
new
ZipFile
(
zipFilename
);
ZipFile
zipFile
=
new
ZipFile
(
zipFilename
);
Enumeration
<?
extends
ZipEntry
>
entries
=
zipFile
.
entries
();
Enumeration
<?
extends
ZipEntry
>
entries
=
zipFile
.
entries
();
String
userName
=
System
.
getProperty
(
"user.name"
);
while
(
entries
.
hasMoreElements
())
{
while
(
entries
.
hasMoreElements
())
{
ZipEntry
ze
=
entries
.
nextElement
();
ZipEntry
ze
=
entries
.
nextElement
();
if
(
ze
.
getName
().
toLowerCase
().
contains
(
"gml"
))
{
String
zeName
=
ze
.
getName
();
File
extractedCityGML
=
selectSaveFileWithDialog
(
null
,
ze
.
getName
(),
""
);
if
(
zeName
.
toLowerCase
().
contains
(
"gml"
))
{
File
extractedCityGML
=
selectSaveFileWithDialog
(
null
,
zeName
.
replace
(
"_GML."
,
"."
).
replace
(
userName
,
"novaFACTORY"
),
""
);
if
(
extractedCityGML
!=
null
)
{
if
(
extractedCityGML
!=
null
)
{
InputStream
cityGMLInputStream
=
zipFile
.
getInputStream
(
ze
);
InputStream
cityGMLInputStream
=
zipFile
.
getInputStream
(
ze
);
System
.
out
.
println
(
"Extract zipFile "
+
zipFilename
+
" to "
+
extractedCityGML
);
//
System.out.println("Extract zipFile " + zipFilename + " to " + extractedCityGML);
FileOutputStream
fos
=
new
FileOutputStream
(
extractedCityGML
);
FileOutputStream
fos
=
new
FileOutputStream
(
extractedCityGML
);
byte
[]
bytes
=
new
byte
[
1024
];
byte
[]
bytes
=
new
byte
[
1024
];
int
length
;
int
length
;
...
...
This diff is collapsed.
Click to expand it.
website/index.html
+
23
-
27
View file @
2eb7a48c
<html>
<html>
<head>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html;charset=ISO-8859-1"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html;charset=ISO-8859-1"
>
<meta
name=
"viewport"
content=
"initial-scale=1.0, user-scalable=no"
/>
<meta
name=
"viewport"
content=
"initial-scale=1.0, user-scalable=no"
/>
<title>
Simstadt Region Chooser
</title>
<title>
Simstadt Region Chooser
</title>
<meta
name=
"keywords"
content=
"polygon,creator,google map,v3,draw,paint"
>
<meta
name=
"keywords"
content=
"polygon,creator,google map,v3,draw,paint"
>
<meta
name=
"description"
content=
"Google Map V3 Polygon Creator for Simstadt"
>
<meta
name=
"description"
content=
"Google Map V3 Polygon Creator for Simstadt"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"style/style.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"style/style.css"
>
<script
type=
"text/javascript"
src=
"script/proj4.js"
></script>
<script
type=
"text/javascript"
src=
"script/proj4.js"
></script>
<script
type=
"text/javascript"
src=
"script/jquery-1.4.2.min.js"
></script>
<script
type=
"text/javascript"
src=
"script/jquery-1.4.2.min.js"
></script>
<!-- <link rel="stylesheet" href="http://openlayers.org/en/v3.4.0/css/ol.css" type="text/css">
<!-- <link rel="stylesheet" href="http://openlayers.org/en/v3.4.0/css/ol.css" type="text/css">
...
@@ -17,27 +17,23 @@
...
@@ -17,27 +17,23 @@
<!-- <script src="ol-debug.js" type="text/javascript"></script> -->
<!-- <script src="ol-debug.js" type="text/javascript"></script> -->
<script
src=
"script/ol.js"
type=
"text/javascript"
></script>
<script
src=
"script/ol.js"
type=
"text/javascript"
></script>
<script
src=
"script/turf.js"
type=
"text/javascript"
></script>
<script
src=
"script/turf.js"
type=
"text/javascript"
></script>
</head>
</head>
<body>
<body>
<div
id=
"header"
>
<div
id=
"header"
>
<ul>
<ul>
<li
class=
"title"
>
<li
class=
"title"
>
Simstadt Region Chooser
Simstadt Region Chooser
</li>
</li>
</ul>
</ul>
<p>
</div>
<span
class=
"instruction"
>
Demo Instruction:
</span>
<div
id=
"map"
class=
"map"
tabindex=
"0"
></div>
Left click on the map to create markers, when last marker meets first marker, it will form a polygon.
<div
id=
"side"
>
</p>
<div
id=
"dataPanel"
>
</div>
</div>
<div
id=
"map"
class=
"map"
tabindex=
"0"
></div>
</div>
<div
id=
"side"
>
<input
id=
"reset"
value=
"Reset"
type=
"button"
class=
"navi"
disabled
/>
<input
id=
"reset"
value=
"Reset"
type=
"button"
class=
"navi"
disabled
/>
<script
src=
"script/simstadt_openlayers.js"
type=
"text/javascript"
></script>
<div
id=
"dataPanel"
>
</div>
</div>
<script
src=
"script/simstadt_openlayers.js"
type=
"text/javascript"
></script>
</body>
</body>
</html>
</html>
This diff is collapsed.
Click to expand it.
website/script/simstadt_openlayers.js
+
0
-
1
View file @
2eb7a48c
//TODO: Add zoom to extent as control
//TODO: Add zoom to extent as control
//TODO: Try to leave everything in 4326
//TODO: Try to leave everything in 4326
//TODO: Add some tiles for offline mode
var
reset_btn
=
$
(
'
#reset
'
)[
0
];
var
reset_btn
=
$
(
'
#reset
'
)[
0
];
var
dataPanel
=
$
(
'
#dataPanel
'
);
var
dataPanel
=
$
(
'
#dataPanel
'
);
...
...
This diff is collapsed.
Click to expand it.
website/style/style.css
+
8
-
2
View file @
2eb7a48c
...
@@ -19,8 +19,9 @@ div#header{
...
@@ -19,8 +19,9 @@ div#header{
div
#map
{
div
#map
{
width
:
70%
;
width
:
70%
;
height
:
7
0%
;
height
:
8
0%
;
float
:
left
;
float
:
left
;
outline
:
0
;
}
}
div
#side
{
div
#side
{
width
:
30%
;
width
:
30%
;
...
@@ -29,9 +30,14 @@ div#side{
...
@@ -29,9 +30,14 @@ div#side{
div
#dataPanel
{
div
#dataPanel
{
width
:
90%
;
width
:
90%
;
height
:
5
0%
;
height
:
8
0%
;
overflow
:
auto
;
overflow
:
auto
;
border
:
2px
solid
#DDDDDD
;
border
:
2px
solid
#DDDDDD
;
font-family
:
Consolas
,
monaco
,
monospace
;
font-size
:
12px
;
box-sizing
:
border-box
;
-moz-box-sizing
:
border-box
;
-webkit-box-sizing
:
border-box
;
}
}
div
#side
input
{
div
#side
input
{
width
:
90%
;
width
:
90%
;
...
...
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
Menu
Explore
Projects
Groups
Snippets