Add Dynamic CoT to SIDC Mapping for Missing Icons#800
Open
chriselsen wants to merge 7 commits intomainfrom
Open
Add Dynamic CoT to SIDC Mapping for Missing Icons#800chriselsen wants to merge 7 commits intomainfrom
chriselsen wants to merge 7 commits intomainfrom
Conversation
- Add CoT to SIDC mapping utility with comprehensive test coverage - Enhance styleimagemissing handler to dynamically generate military symbols - Add icon utility functions for source type detection and SIDC extraction - Configure Vitest globals for testing infrastructure Resolves missing military symbol icons by mapping CoT types to SIDC codes and generating them on-demand using milsymbol library.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Correct expected SIDC code for 'a-f-G-U-C-I' from '10031000001211000000' to '13060000121100000000000000000000' to match actual mapping function output.
Correct expected SIDC code for 'a-h-A-M-F-Q' from '01044000001211000000' to '14010000121100000000000000000000' to match actual mapping function output.
This reverts commit 56083a8.
4e9eb03 to
50d0d36
Compare
Collaborator
Author
|
@ingalls We can close this in favor of just extending the sprite with missing icons. These are the only icons that I see missing right now:
|
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.




Overview
This PR implements dynamic icon generation for CoT (Cursor on Target) types that have SIDC (Symbol Identification Coding) mappings. When the map encounters a missing icon, it now attempts to map the CoT type to a SIDC code and generate the appropriate military symbol on-demand.
Changes
Core Functionality
styleimagemissingevent handler to generate military symbolsFiles Added
api/web/src/base/utils/cot-sidc-mapping.ts- Core mapping functionalityapi/web/src/base/utils/icon-utils.ts- Icon utility functionsapi/web/src/base/utils/__tests__/cot-sidc-mapping.test.ts- Comprehensive test coverageFiles Modified
api/web/src/stores/map.ts- Enhanced styleimagemissing handlerapi/web/tsconfig.json- Added Vitest globals for testingBenefits
Testing
Added comprehensive test suite covering:
Fixes #799 : Civilian tug symbol, missing in sprite is being displayed.

Backward Compatibility
Fully backward compatible - existing icon handling remains unchanged, this only adds support for previously missing icons.