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
7ea7f80a
Commit
7ea7f80a
authored
2 years ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
HTML update
parent
9d451409
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/resources/eu/simstadt/regionchooser/website/index.html
+3
-4
...in/resources/eu/simstadt/regionchooser/website/index.html
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+1
-24
...stadt/regionchooser/website/script/simstadt_openlayers.js
with
4 additions
and
28 deletions
+4
-28
src/main/resources/eu/simstadt/regionchooser/website/index.html
+
3
-
4
View file @
7ea7f80a
...
...
@@ -5,9 +5,8 @@
<meta
http-equiv=
"Content-Type"
content=
"text/html;charset=UTF-8"
/>
<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"
/>
<meta
name=
"keywords"
content=
"region chooser,citygml,polygon,creator,extract,simstadt,buildings"
/>
<meta
name=
"description"
content=
"RegionChooser for Simstadt"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"style/style.css"
/>
<!-- Firebug for js console:
...
...
@@ -24,7 +23,7 @@
<body>
<div
id=
"header"
>
<ul>
<li
class=
"title"
><span
id=
"repo_path"
></span></li>
<li
class=
"title"
><span
id=
"repo_path"
>
RegionChooser
</span></li>
<li
class=
"title"
id=
"select_repository"
style=
"visibility:hidden"
><button
onclick=
"regionChooser.selectRepository()"
>
Select repository
</button></li>
</ul>
</div>
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+
1
-
24
View file @
7ea7f80a
...
...
@@ -17,22 +17,6 @@ var regionChooser = (function(){
$
(
"
html
"
).
addClass
(
"
wait
"
);
}
// Hash function. For testing purposes in browser (no Feature ID is available)
const
cyrb53
=
(
str
,
seed
=
0
)
=>
{
let
h1
=
0xdeadbeef
^
seed
,
h2
=
0x41c6ce57
^
seed
;
for
(
let
i
=
0
,
ch
;
i
<
str
.
length
;
i
++
)
{
ch
=
str
.
charCodeAt
(
i
);
h1
=
Math
.
imul
(
h1
^
ch
,
2654435761
);
h2
=
Math
.
imul
(
h2
^
ch
,
1597334677
);
}
h1
=
Math
.
imul
(
h1
^
(
h1
>>>
16
),
2246822507
)
^
Math
.
imul
(
h2
^
(
h2
>>>
13
),
3266489909
);
h2
=
Math
.
imul
(
h2
^
(
h2
>>>
16
),
2246822507
)
^
Math
.
imul
(
h1
^
(
h1
>>>
13
),
3266489909
);
return
4294967296
*
(
2097151
&
h2
)
+
(
h1
>>>
0
);
};
var
osm_layer
=
new
ol
.
layer
.
Tile
({
source
:
new
ol
.
source
.
OSM
()
});
...
...
@@ -178,15 +162,8 @@ var regionChooser = (function(){
var
sketch_percentage
=
Math
.
round
(
intersectionArea
/
polygonArea
*
100
);
intersections
.
addFeature
(
intersection
);
var
link
=
'
<li>
'
// TODO: Add checkbox + label +
// TODO: Add submit.
// TODO: If possible, highlight the corresponding polygon when hovering above a name.
if
(
fromJavaFX
)
{
link
+=
'
<input type="checkbox" id="citygml_
'
+
feature
.
getId
()
+
'
" class="select_citygml"><label for="citygml_
'
+
feature
.
getId
()
+
'
">
'
+
feature
[
'
name
'
]
+
'
</label>
'
;
}
else
{
h
=
cyrb53
(
feature
[
'
name
'
]);
link
+=
'
<input type="checkbox" id="citygml_
'
+
h
+
'
" class="select_citygml"><label for="citygml_
'
+
h
+
'
">
'
+
feature
[
'
name
'
]
+
'
</label>
'
;
}
link
+=
'
<input type="checkbox" id="citygml_
'
+
feature
.
getId
()
+
'
" class="select_citygml"><label for="citygml_
'
+
feature
.
getId
()
+
'
">
'
+
feature
[
'
name
'
]
+
'
</label>
'
;
link
+=
"
(
"
+
citygml_percentage
+
"
%
"
;
if
(
sketch_percentage
==
100
)
{
...
...
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