Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection order #128

Closed
reinij opened this issue Dec 10, 2024 · 2 comments · Fixed by #129
Closed

Collection order #128

reinij opened this issue Dec 10, 2024 · 2 comments · Fixed by #129
Labels
enhancement New feature or request
Milestone

Comments

@reinij
Copy link

reinij commented Dec 10, 2024

Modify collection order to follow the collection list in the properties file. Now it seems to be random at least with Geopackage as a data source.

An example:
collections=aita, allas, ankkuripaikka, autoliikennealue, avoin_metsamaa, building_installation, eramaa_alue, erityisalue, esterakennelma, harva_louhikko,...

and in HTML
image

@reinij reinij added the enhancement New feature or request label Dec 10, 2024
@reinij reinij changed the title Coleection order Collection order Dec 10, 2024
@jampukka
Copy link
Collaborator

jampukka commented Dec 10, 2024

This is due to FeatureServiceConfig #getCollections returning the values from a HashMap where the order is not "random" (it doesn't change per request) but it's not alphabetic or the insertion order either. Fixing this is very easy.

I'm assuming the expected order would the one that appears in configuration (and not alphabetical), e.g.
collections=z, x, y
Would return

  • Z
  • X
  • Y

@reinij
Copy link
Author

reinij commented Dec 10, 2024

This sounds as a reasonable fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants