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
2eb7a48c
Commit
2eb7a48c
authored
Jun 01, 2015
by
duminil
Browse files
RegionChooser: Cleaning up
parent
29d11660
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/eu/simstadt/nf4j/ExportJobFromJavaFXRegionChooser.java
View file @
2eb7a48c
...
...
@@ -70,7 +70,7 @@ public void processJob(Geometry poly, String productName, JSObject novaFactoryOp
@Override
public
void
jobStatusChanged
(
JobStatusEvent
event
)
{
JobStatus
status
=
(
JobStatus
)
event
.
getSource
();
System
.
out
.
println
(
status
);
//
System.out.println(status);
if
(
status
==
JobStatus
.
LOCAL
)
{
novaFactoryOpenLayer
.
call
(
"updateStatus"
,
"REQUEST HAS BEEN PREPARED"
);
}
else
if
(
status
==
JobStatus
.
SENT
)
{
...
...
src/eu/simstadt/regionchooser/RegionChooserFX.java
View file @
2eb7a48c
...
...
@@ -97,13 +97,16 @@ protected Integer call() throws Exception {
public
void
extractZIPtoGML
(
String
zipFilename
)
throws
IOException
{
ZipFile
zipFile
=
new
ZipFile
(
zipFilename
);
Enumeration
<?
extends
ZipEntry
>
entries
=
zipFile
.
entries
();
String
userName
=
System
.
getProperty
(
"user.name"
);
while
(
entries
.
hasMoreElements
())
{
ZipEntry
ze
=
entries
.
nextElement
();
if
(
ze
.
getName
().
toLowerCase
().
contains
(
"gml"
))
{
File
extractedCityGML
=
selectSaveFileWithDialog
(
null
,
ze
.
getName
(),
""
);
String
zeName
=
ze
.
getName
();
if
(
zeName
.
toLowerCase
().
contains
(
"gml"
))
{
File
extractedCityGML
=
selectSaveFileWithDialog
(
null
,
zeName
.
replace
(
"_GML."
,
"."
).
replace
(
userName
,
"novaFACTORY"
),
""
);
if
(
extractedCityGML
!=
null
)
{
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
);
byte
[]
bytes
=
new
byte
[
1024
];
int
length
;
...
...
website/index.html
View file @
2eb7a48c
<html>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html;charset=ISO-8859-1"
>
<meta
name=
"viewport"
content=
"initial-scale=1.0, user-scalable=no"
/>
<title>
Simstadt Region Chooser
</title>
<meta
name=
"keywords"
content=
"polygon,creator,google map,v3,draw,paint"
>
<meta
name=
"description"
content=
"Google Map V3 Polygon Creator for Simstadt"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"style/style.css"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html;charset=ISO-8859-1"
>
<meta
name=
"viewport"
content=
"initial-scale=1.0, user-scalable=no"
/>
<title>
Simstadt Region Chooser
</title>
<meta
name=
"keywords"
content=
"polygon,creator,google map,v3,draw,paint"
>
<meta
name=
"description"
content=
"Google Map V3 Polygon Creator for Simstadt"
>
<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/jquery-1.4.2.min.js"
></script>
<!-- <link rel="stylesheet" href="http://openlayers.org/en/v3.4.0/css/ol.css" type="text/css">
...
...
@@ -17,27 +17,23 @@
<!-- <script src="ol-debug.js" type="text/javascript"></script> -->
<script
src=
"script/ol.js"
type=
"text/javascript"
></script>
<script
src=
"script/turf.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
id=
"header"
>
<ul>
<li
class=
"title"
>
Simstadt Region Chooser
</li>
</ul>
<p>
<span
class=
"instruction"
>
Demo Instruction:
</span>
Left click on the map to create markers, when last marker meets first marker, it will form a polygon.
</p>
</div>
<div
id=
"map"
class=
"map"
tabindex=
"0"
></div>
<div
id=
"side"
>
<input
id=
"reset"
value=
"Reset"
type=
"button"
class=
"navi"
disabled
/>
<div
id=
"dataPanel"
>
</div>
</div>
<script
src=
"script/simstadt_openlayers.js"
type=
"text/javascript"
></script>
<div
id=
"header"
>
<ul>
<li
class=
"title"
>
Simstadt Region Chooser
</li>
</ul>
</div>
<div
id=
"map"
class=
"map"
tabindex=
"0"
></div>
<div
id=
"side"
>
<div
id=
"dataPanel"
>
</div>
</div>
<input
id=
"reset"
value=
"Reset"
type=
"button"
class=
"navi"
disabled
/>
<script
src=
"script/simstadt_openlayers.js"
type=
"text/javascript"
></script>
</body>
</html>
website/script/simstadt_openlayers.js
View file @
2eb7a48c
//TODO: Add zoom to extent as control
//TODO: Try to leave everything in 4326
//TODO: Add some tiles for offline mode
var
reset_btn
=
$
(
'
#reset
'
)[
0
];
var
dataPanel
=
$
(
'
#dataPanel
'
);
...
...
website/style/style.css
View file @
2eb7a48c
...
...
@@ -19,8 +19,9 @@ div#header{
div
#map
{
width
:
70%
;
height
:
7
0%
;
height
:
8
0%
;
float
:
left
;
outline
:
0
;
}
div
#side
{
width
:
30%
;
...
...
@@ -29,9 +30,14 @@ div#side{
div
#dataPanel
{
width
:
90%
;
height
:
5
0%
;
height
:
8
0%
;
overflow
:
auto
;
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
{
width
:
90%
;
...
...
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