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
bd29d301
Commit
bd29d301
authored
2 years ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
Sort citygmls inside project.
parent
942d3f94
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+7
-3
...stadt/regionchooser/website/script/simstadt_openlayers.js
with
7 additions
and
3 deletions
+7
-3
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+
7
-
3
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
()
{
...
...
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