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
bd29d301
Commit
bd29d301
authored
Oct 13, 2022
by
Eric Duminil
Browse files
Sort citygmls inside project.
parent
942d3f94
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
View file @
bd29d301
...
...
@@ -4,6 +4,7 @@ var regionChooser = (function(){
var
fromJavaFX
=
navigator
.
userAgent
.
indexOf
(
'
JavaFX
'
)
!==
-
1
;
var
dataPanel
=
$
(
'
#dataPanel
'
);
var
wgs84Sphere
=
new
ol
.
Sphere
(
6378137
);
var
features_by_project
;
var
gmlId
;
publicScope
.
init
=
function
(){
...
...
@@ -96,6 +97,11 @@ var regionChooser = (function(){
feature
[
"
name
"
]
=
feature
.
get
(
"
name
"
);
feature
[
"
source
"
]
=
"
CityGML
"
;
});
features_by_project
=
groupBy
(
kml_source
.
getFeatures
(),
"
project
"
);
// Sort CityGMLs inside each project
Object
.
values
(
features_by_project
).
forEach
(
features
=>
features
.
sort
((
a
,
b
)
=>
a
.
name
.
localeCompare
(
b
.
name
)));
}
// The features are not added to a regular vector layer/source,
...
...
@@ -190,8 +196,6 @@ var regionChooser = (function(){
var
polygonArea
=
sketch
.
getGeometry
().
getArea
();
var
intersection_found
=
false
;
intersections
.
clear
();
//NOTE: getFeatures seems to not be sorted anymore. :-/
features_by_project
=
groupBy
(
kml_source
.
getFeatures
(),
"
project
"
);
Object
.
keys
(
features_by_project
).
forEach
(
function
(
project
)
{
features
=
features_by_project
[
project
];
...
...
@@ -368,7 +372,7 @@ var regionChooser = (function(){
updateGMLPolygons
();
displayHelp
();
document
.
documentElement
.
className
=
''
;
// Stop waiting
console
.
log
(
"
R
EADY
!
"
);
console
.
log
(
"
R
eady
!
"
);
}
publicScope
.
downloadFromSelectedCityGMLs
=
function
()
{
...
...
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