feat: support nested map source categories - #12
Open
LonghiTW wants to merge 3 commits into
Open
Conversation
Add support for multi-level category hierarchy in map source selection, enabling city-level subcategories under countries (e.g. Taiwan > Taipei). - Add subcategories field to Category class with recursive forEach - Update CategoryMap to use String[] path for get/set/forEach operations - Update CategoryMap deserializer/serializer for recursive JSON/YAML - Update CategoryMapMergeStrategy to work with category paths - Add getMapServiceCategoryPath/setMapServiceCategoryPath to config - Update MapRenderingOptionsSidebar to use category path selection - Update loaders (LoaderRegistry, TileMapServiceStateLoader, TileMapServiceLoader) for path-based access - Move Taipei map entries under Taiwan -> Taipei subcategory in default_maps.yml
Collaborator
Amrsatrio
reviewed
Aug 3, 2026
Collaborator
There was a problem hiding this comment.
- The new subcategory is better named in English.
- The subcategory when opened for the first time results in a 1-second hitch.
- No logo for the subcategory items even though specified in the yml. (Not really important, cosmetic only)
Otherwise, looks good.
| projection: webmercator | ||
| max_thread: 2 | ||
| default_zoom: 21 | ||
| 臺北: |
Collaborator
There was a problem hiding this comment.
Should be named in English, I think.
There was a problem hiding this comment.
Ideally yes, so everyone can understand
Amrsatrio
reviewed
Aug 3, 2026
| if (isLeafNode(childNode)) { | ||
| category.put(key, ctxt.readTreeAsValue(childNode, this.valueType)); | ||
| } else { | ||
| category.getSubcategories().put(key, deserializeCategory(childNode, ctxt)); |
Collaborator
There was a problem hiding this comment.
- Add max recursion depth like 3 or 4 depending on how deep this should realistically support. Because without it, it feels like code smell. Same for the serializer.
Collaborator
Please enable commit signing for future commits as that's a requirement in here. |
Add support for multi-level category hierarchy in map source selection, enabling city-level subcategories under countries (e.g. Taiwan > Taipei). - Add subcategories field to Category class with recursive forEach - Update CategoryMap to use String[] path for get/set/forEach operations - Update CategoryMap deserializer/serializer for recursive JSON/YAML - Update CategoryMapMergeStrategy to work with category paths - Add getMapServiceCategoryPath/setMapServiceCategoryPath to config - Update MapRenderingOptionsSidebar to use category path selection - Update loaders (LoaderRegistry, TileMapServiceStateLoader, TileMapServiceLoader) for path-based access - Move Taipei map entries under Taiwan -> Taipei subcategory in default_maps.yml
Author
|
Thanks for the review! I've addressed the feedback and pushed a new signed commit. Changes in the latest update:
Commit signing has also been enabled using SSH signing, and the latest pushed commit is signed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Add support for multi-level category hierarchy in map source selection, enabling city-level subcategories under countries (e.g. Taiwan > Taipei).