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
1f678d58
Commit
1f678d58
authored
2 years ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
Just an example with radio buttons
parent
cb90b14b
master
develop
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+18
-1
...stadt/regionchooser/website/script/simstadt_openlayers.js
src/main/resources/eu/simstadt/regionchooser/website/style/style.css
+0
-4
...sources/eu/simstadt/regionchooser/website/style/style.css
with
18 additions
and
5 deletions
+18
-5
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+
18
-
1
View file @
1f678d58
...
@@ -9,6 +9,22 @@ var regionChooser = (function(){
...
@@ -9,6 +9,22 @@ var regionChooser = (function(){
$
(
"
html
"
).
addClass
(
"
wait
"
);
$
(
"
html
"
).
addClass
(
"
wait
"
);
}
}
// Hash function
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
({
var
osm_layer
=
new
ol
.
layer
.
Tile
({
source
:
new
ol
.
source
.
OSM
()
source
:
new
ol
.
source
.
OSM
()
});
});
...
@@ -160,7 +176,8 @@ var regionChooser = (function(){
...
@@ -160,7 +176,8 @@ var regionChooser = (function(){
link
+=
"
<a href=
\"
#
\"
onclick=
\"
regionChooser.downloadRegionFrom
"
+
feature
[
"
source
"
]
+
"
(
"
+
feature
.
getId
()
link
+=
"
<a href=
\"
#
\"
onclick=
\"
regionChooser.downloadRegionFrom
"
+
feature
[
"
source
"
]
+
"
(
"
+
feature
.
getId
()
+
"
);return false;
\"
>
"
+
feature
[
"
name
"
]
+
"
</a>
"
;
+
"
);return false;
\"
>
"
+
feature
[
"
name
"
]
+
"
</a>
"
;
}
else
{
}
else
{
link
+=
feature
[
'
name
'
];
h
=
cyrb53
(
feature
[
'
name
'
]);
link
+=
'
<input type="checkbox" id="check
'
+
h
+
'
"><label for="check
'
+
h
+
'
">
'
+
feature
[
'
name
'
]
+
'
</label>
'
;
}
}
link
+=
"
(
"
+
citygml_percentage
+
"
%
"
;
link
+=
"
(
"
+
citygml_percentage
+
"
%
"
;
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/eu/simstadt/regionchooser/website/style/style.css
+
0
-
4
View file @
1f678d58
...
@@ -130,10 +130,6 @@ div#dataPanel li {
...
@@ -130,10 +130,6 @@ div#dataPanel li {
line-height
:
1
;
line-height
:
1
;
}
}
div
#side
input
{
width
:
90%
;
}
div
#side
input
.navi
{
div
#side
input
.navi
{
font-size
:
18px
;
font-size
:
18px
;
height
:
30px
;
height
:
30px
;
...
...
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