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
8625d7f2
Commit
8625d7f2
authored
2 years ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
srsName should always be defined.
parent
c356313c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+4
-10
...stadt/regionchooser/website/script/simstadt_openlayers.js
with
4 additions
and
10 deletions
+4
-10
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+
4
-
10
View file @
8625d7f2
...
...
@@ -67,7 +67,7 @@ var regionChooser = (function(){
feature
.
setId
(
gmlId
++
);
kml_source
.
addFeature
(
feature
);
dataPanel
.
append
(
'
.
'
);
srsName
=
feature
.
get
(
"
srsName
"
)
||
"
EPSG:31467
"
;
srsName
=
feature
.
get
(
"
srsName
"
);
if
(
proj4
.
defs
(
srsName
)
===
undefined
){
console
.
warning
(
srsName
+
"
isn't defined by Proj4js!
"
)
}
...
...
@@ -173,13 +173,8 @@ var regionChooser = (function(){
}
publicScope
.
isDownloadPossible
=
function
(){
var
count
=
0
;
document
.
querySelectorAll
(
"
input.select_citygml
"
).
forEach
(
c
=>
{
if
(
c
.
checked
){
count
+=
1
;
}
});
document
.
getElementById
(
"
download_region_button
"
).
disabled
=
(
count
==
0
);
var
checkedBoxes
=
Array
.
from
(
document
.
querySelectorAll
(
"
input.select_citygml
"
)).
filter
(
c
=>
c
.
checked
);
document
.
getElementById
(
"
download_region_button
"
).
disabled
=
(
checkedBoxes
.
length
==
0
);
}
function
findIntersection
(
feature
,
polygon
)
{
...
...
@@ -228,7 +223,7 @@ var regionChooser = (function(){
})
var
project
=
features
[
0
].
get
(
"
project
"
);
//TODO: Check all the same
var
srsName
=
features
[
0
].
get
(
"
srsName
"
)
||
"
EPSG:31467
"
;
//TODO: Check all the same
var
srsName
=
features
[
0
].
get
(
"
srsName
"
);
//TODO: Check all the same
var
citygmlNames
=
features
.
map
(
f
=>
f
.
get
(
"
name
"
));
// Waiting 100ms in order to let the cursor change
setTimeout
(
function
()
{
...
...
@@ -315,7 +310,6 @@ var regionChooser = (function(){
}
function
sketchAsWKT
(
srsName
)
{
srsName
=
(
typeof
srsName
===
'
undefined
'
)
?
'
EPSG:4326
'
:
srsName
;
var
wktFormat
=
new
ol
.
format
.
WKT
();
return
wktFormat
.
writeFeature
(
sketch
,
{
dataProjection
:
ol
.
proj
.
get
(
srsName
),
...
...
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