Extract aircraft SVG icons to external files and add dynamic marker updates
- Extract all aircraft type SVG designs to separate files in /static/icons/ - Add icon caching system with async loading and fallback mechanisms - Implement dynamic marker icon updates when aircraft properties change - Detect and respond to aircraft type/category, ground status, and rotation changes - Use currentColor in SVG files for dynamic color application - Maintain performance with intelligent change detection (5° rotation threshold) - Support real-time marker updates for weight class transitions and ADS-B changes 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
da4645d483
commit
43e55b2ba0
7 changed files with 147 additions and 59 deletions
9
assets/static/icons/cargo.svg
Normal file
9
assets/static/icons/cargo.svg
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="translate(16,16)">
|
||||
<!-- Wide-body cargo aircraft shape -->
|
||||
<path d="M0,-12 L-10,8 L-3,8 L0,12 L3,8 L10,8 Z" fill="currentColor"/>
|
||||
<!-- Fuselage bulk -->
|
||||
<rect x="-2" y="-6" width="4" height="8" fill="currentColor"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 384 B |
7
assets/static/icons/commercial.svg
Normal file
7
assets/static/icons/commercial.svg
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="translate(16,16)">
|
||||
<!-- Standard commercial aircraft shape -->
|
||||
<path d="M0,-12 L-8,8 L-2,8 L0,12 L2,8 L8,8 Z" fill="currentColor"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 292 B |
7
assets/static/icons/ga.svg
Normal file
7
assets/static/icons/ga.svg
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="translate(16,16)">
|
||||
<!-- Small general aviation aircraft -->
|
||||
<path d="M0,-10 L-5,6 L-1,6 L0,10 L1,6 L5,6 Z" fill="currentColor"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 289 B |
10
assets/static/icons/ground.svg
Normal file
10
assets/static/icons/ground.svg
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="translate(16,16)">
|
||||
<!-- Ground vehicle - truck/car shape -->
|
||||
<rect x="-6" y="-4" width="12" height="8" fill="currentColor" rx="2"/>
|
||||
<!-- Wheels -->
|
||||
<circle cx="-3" cy="2" r="2" fill="#333"/>
|
||||
<circle cx="3" cy="2" r="2" fill="#333"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 405 B |
12
assets/static/icons/helicopter.svg
Normal file
12
assets/static/icons/helicopter.svg
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="translate(16,16)">
|
||||
<!-- Rotor disc -->
|
||||
<circle cx="0" cy="0" r="10" fill="none" stroke="currentColor" stroke-width="1" opacity="0.3"/>
|
||||
<!-- Main body -->
|
||||
<path d="M0,-8 L-6,6 L-1,6 L0,8 L1,6 L6,6 Z" fill="currentColor"/>
|
||||
<!-- Rotor mast -->
|
||||
<path d="M0,-6 L0,-10" stroke="currentColor" stroke-width="2"/>
|
||||
<path d="M0,6 L0,8" stroke="currentColor" stroke-width="2"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 546 B |
7
assets/static/icons/military.svg
Normal file
7
assets/static/icons/military.svg
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="translate(16,16)">
|
||||
<!-- Swept-wing fighter jet shape -->
|
||||
<path d="M0,-12 L-4,2 L-8,8 L-2,6 L0,12 L2,6 L8,8 L4,2 Z" fill="currentColor"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 297 B |
Loading…
Add table
Add a link
Reference in a new issue