ui/map/aircraft/AircraftRenderer¶
Classes¶
AircraftRenderer¶
Defined in: ui/map/aircraft/AircraftRenderer.ts:30
AircraftRenderer - Handles aircraft visualization on the map
This class extends EntityRenderer to provide aircraft-specific rendering functionality, including aircraft labels with speed, altitude, and vertical speed information, as well as conflict detection.
Extends¶
Constructors¶
Constructor¶
Defined in: ui/map/aircraft/AircraftRenderer.ts:37
Parameters¶
map¶
Map$1
displayOptions¶
shapeDrawer¶
stateManager¶
Returns¶
Overrides¶
Properties¶
map¶
Defined in: ui/map/EntityRenderer.ts:70
Inherited from¶
displayOptions¶
Defined in: ui/map/EntityRenderer.ts:71
Inherited from¶
config¶
Defined in: ui/map/EntityRenderer.ts:72
Inherited from¶
selectedEntity¶
Defined in: ui/map/EntityRenderer.ts:75
Inherited from¶
entityData¶
Defined in: ui/map/EntityRenderer.ts:76
Inherited from¶
featureCache¶
Defined in: ui/map/EntityRenderer.ts:79
Inherited from¶
Methods¶
initialize()¶
Defined in: ui/map/EntityRenderer.ts:92
Initialize the entity renderer Creates sprites and sets up map layers
Parameters¶
forceImmediate?¶
boolean = false
Force immediate setup even if style check fails (use when called from map load callback)
Returns¶
void
Inherited from¶
setupEntities()¶
Defined in: ui/map/EntityRenderer.ts:106
Set up entity sprites and layers
Returns¶
void
Inherited from¶
createSprites()¶
Defined in: ui/map/EntityRenderer.ts:121
Create sprites for entity states: normal, selected, and optionally conflict. Drawn once at a fixed oversampled resolution; the on-screen size is controlled solely by the layer's icon-size property.
Returns¶
void
Inherited from¶
getProtectedZoneRadius()¶
Defined in: ui/map/EntityRenderer.ts:373
Get the protected zone radius for an entity
Parameters¶
entityData¶
Entity data
index¶
number
Index of the entity in the data arrays
Returns¶
number
Radius in meters, or 0 if no protected zone
Inherited from¶
EntityRenderer.getProtectedZoneRadius
updateEntityDisplay()¶
Defined in: ui/map/EntityRenderer.ts:382
Update entity display with new data using efficient incremental updates
Parameters¶
entityData¶
Entity data to display
Returns¶
void
Inherited from¶
EntityRenderer.updateEntityDisplay
updateProtectedZones()¶
Defined in: ui/map/EntityRenderer.ts:499
Update protected zones display Creates circle polygon features for each entity's protected zone using turf.js
Parameters¶
entityData¶
Returns¶
void
Inherited from¶
EntityRenderer.updateProtectedZones
updateLayerVisibility()¶
Defined in: ui/map/EntityRenderer.ts:594
Update layer visibility based on display options
Returns¶
void
Inherited from¶
EntityRenderer.updateLayerVisibility
setSelectedEntity()¶
Defined in: ui/map/EntityRenderer.ts:616
Set selected entity Updates the selected state and refreshes the display
Parameters¶
entityId¶
string | null
Returns¶
void
Inherited from¶
EntityRenderer.setSelectedEntity
updateIconSize()¶
Defined in: ui/map/EntityRenderer.ts:629
Update icon size
Parameters¶
iconSize¶
number
New icon size multiplier
Returns¶
void
Inherited from¶
updateColors()¶
Defined in: ui/map/EntityRenderer.ts:642
Update entity colors
Parameters¶
colors¶
Partial\<EntityColors>
New color configuration
Returns¶
void
Inherited from¶
setEntityShape()¶
Defined in: ui/map/EntityRenderer.ts:701
Change the entity shape at runtime
Parameters¶
shapeDrawer¶
New shape drawing function
Returns¶
void
Inherited from¶
onStyleChange()¶
Defined in: ui/map/EntityRenderer.ts:725
Handle map style changes Re-creates sprites and layers when the style changes.
If the style is already loaded (e.g. this was invoked from within a
'style.load' handler), run setup synchronously — otherwise once('style.load')
would queue the callback until the next style change, which leaves the
aircraft layers missing and can race with other renderers re-adding
their own layers in the meantime.
Returns¶
void
Inherited from¶
destroy()¶
Defined in: ui/map/EntityRenderer.ts:745
Clean up resources
Returns¶
void
Inherited from¶
buildEntityLabel()¶
Defined in: ui/map/aircraft/AircraftRenderer.ts:62
Build aircraft label text based on display options Includes aircraft ID, speed, altitude, and vertical speed indicators
Parameters¶
aircraftData¶
index¶
number
Returns¶
string
Overrides¶
EntityRenderer.buildEntityLabel
getConflictStatus()¶
Defined in: ui/map/aircraft/AircraftRenderer.ts:104
Get conflict status for an aircraft
Parameters¶
aircraftData¶
index¶
number
Returns¶
boolean
Overrides¶
EntityRenderer.getConflictStatus
shouldShowLabels()¶
Defined in: ui/map/aircraft/AircraftRenderer.ts:111
Determine if labels should be shown
Returns¶
boolean
Overrides¶
EntityRenderer.shouldShowLabels
shouldShowEntities()¶
Defined in: ui/map/aircraft/AircraftRenderer.ts:118
Determine if aircraft should be shown
Returns¶
boolean
Overrides¶
EntityRenderer.shouldShowEntities
shouldShowProtectedZones()¶
Defined in: ui/map/aircraft/AircraftRenderer.ts:125
Determine if protected zones should be shown
Returns¶
boolean
Overrides¶
EntityRenderer.shouldShowProtectedZones
setupLayers()¶
Defined in: ui/map/aircraft/AircraftRenderer.ts:153
Override setupLayers so that whenever the 2D aircraft sprite/label layers are (re-)added, the 3D aircraft custom layer is moved back to the top. Without this, a lazy 2D init (e.g. after a style change or when aircraft data arrives before the map is fully ready) can leave the 2D icons stacked above the 3D models.
Returns¶
void
Overrides¶
updateAircraftDisplay()¶
Defined in: ui/map/aircraft/AircraftRenderer.ts:162
Update aircraft display with new data Provides aircraft-specific method name for backward compatibility
Parameters¶
aircraftData¶
Returns¶
void
clearTrails()¶
Defined in: ui/map/aircraft/AircraftRenderer.ts:291
Clear all aircraft trails
Returns¶
void
setSelectedAircraft()¶
Defined in: ui/map/aircraft/AircraftRenderer.ts:305
Set selected aircraft Provides aircraft-specific method name for backward compatibility
Parameters¶
aircraftId¶
string | null
Returns¶
void
updateDisplayOptions()¶
Defined in: ui/map/aircraft/AircraftRenderer.ts:312
Update display options
Parameters¶
options¶
Partial\<DisplayOptions>
Returns¶
void
setAircraftShape()¶
Defined in: ui/map/aircraft/AircraftRenderer.ts:379
Change the aircraft shape at runtime
Parameters¶
shapeDrawer¶
New shape drawing function
Returns¶
void
Type Aliases¶
AircraftShapeDrawer¶
Defined in: ui/map/aircraft/AircraftRenderer.ts:13
Aircraft shape drawing function type (for backward compatibility)