Aircraft markers show as plain circles despite known type #14

Closed
opened 2025-08-24 18:21:03 +02:00 by olemd · 1 comment
Owner

Description

Aircraft markers frequently display as plain circles even when the aircraft type/category is known and should show a specific icon.

Current Behavior

  • Some aircraft show correct type-specific icons (commercial, military, etc.)
  • Other aircraft show as generic circle markers
  • This happens inconsistently, even for aircraft with known ADS-B emitter categories

Expected Behavior

  • All aircraft with known types should display appropriate type-specific icons
  • Only aircraft with truly unknown/missing type data should show as circles
  • Consistent icon selection based on ADS-B emitter category classification

Potential Causes

  1. Icon Selection Logic: Aircraft classification may not be working correctly
  2. Missing Icon Files: Some aircraft types may not have corresponding SVG icons
  3. CSS Class Issues: Icon styling may not be applied properly
  4. Data Processing: Type information might be lost during data processing
  5. Race Conditions: Icons might not update when type information becomes available

Investigation Needed

  • Audit aircraft type classification logic in JavaScript
  • Verify all required icon files exist in assets/static/icons/
  • Check CSS classes for aircraft markers
  • Review how type information flows from backend to frontend
  • Test with known aircraft types to identify pattern

Files to Check

  • assets/static/js/modules/aircraft-manager.js - Aircraft marker creation
  • assets/static/js/modules/map-manager.js - Icon selection logic
  • assets/static/icons/ - Icon file availability
  • assets/static/css/style.css - Aircraft marker styling
  • Backend ADS-B processing - Type classification accuracy
  • May be related to #12 (CSS class inconsistency)
  • Could affect user's ability to distinguish aircraft types visually

Labels

bug, frontend, aircraft-display

## Description Aircraft markers frequently display as plain circles even when the aircraft type/category is known and should show a specific icon. ## Current Behavior - Some aircraft show correct type-specific icons (commercial, military, etc.) - Other aircraft show as generic circle markers - This happens inconsistently, even for aircraft with known ADS-B emitter categories ## Expected Behavior - All aircraft with known types should display appropriate type-specific icons - Only aircraft with truly unknown/missing type data should show as circles - Consistent icon selection based on ADS-B emitter category classification ## Potential Causes 1. **Icon Selection Logic**: Aircraft classification may not be working correctly 2. **Missing Icon Files**: Some aircraft types may not have corresponding SVG icons 3. **CSS Class Issues**: Icon styling may not be applied properly 4. **Data Processing**: Type information might be lost during data processing 5. **Race Conditions**: Icons might not update when type information becomes available ## Investigation Needed - Audit aircraft type classification logic in JavaScript - Verify all required icon files exist in assets/static/icons/ - Check CSS classes for aircraft markers - Review how type information flows from backend to frontend - Test with known aircraft types to identify pattern ## Files to Check - assets/static/js/modules/aircraft-manager.js - Aircraft marker creation - assets/static/js/modules/map-manager.js - Icon selection logic - assets/static/icons/ - Icon file availability - assets/static/css/style.css - Aircraft marker styling - Backend ADS-B processing - Type classification accuracy ## Related Issues - May be related to #12 (CSS class inconsistency) - Could affect user's ability to distinguish aircraft types visually ## Labels bug, frontend, aircraft-display
olemd closed this issue 2025-09-01 19:46:16 +02:00
Author
Owner

Root Cause Found: The loadIcons() function was only loading 6 out of 10 available aircraft icon files.

Problem: Aircraft with weight-based ADS-B categories (heavy, large, light, medium) were falling back to circle icons because their SVG files weren't being loaded into the icon cache.

Available Icons: cargo.svg, commercial.svg, ga.svg, ground.svg, heavy.svg, helicopter.svg, large.svg, light.svg, medium.svg, military.svg

Previously Loaded: Only commercial, helicopter, military, cargo, ga, ground

Fix: Added missing icon types (heavy, large, light, medium) to the iconTypes array in aircraft-manager.js:27.

Result: All aircraft with known ADS-B emitter categories now display proper type-specific icons instead of generic circles. The comprehensive aircraft type detection logic was working correctly - it just needed all icon files to be loaded.

**Root Cause Found**: The `loadIcons()` function was only loading 6 out of 10 available aircraft icon files. **Problem**: Aircraft with weight-based ADS-B categories (heavy, large, light, medium) were falling back to circle icons because their SVG files weren't being loaded into the icon cache. **Available Icons**: `cargo.svg, commercial.svg, ga.svg, ground.svg, heavy.svg, helicopter.svg, large.svg, light.svg, medium.svg, military.svg` **Previously Loaded**: Only `commercial, helicopter, military, cargo, ga, ground` **Fix**: Added missing icon types (`heavy, large, light, medium`) to the `iconTypes` array in `aircraft-manager.js:27`. **Result**: All aircraft with known ADS-B emitter categories now display proper type-specific icons instead of generic circles. The comprehensive aircraft type detection logic was working correctly - it just needed all icon files to be loaded.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
olemd/skyview#14
No description provided.