Skip to content

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
new AircraftRenderer(
   map, 
   displayOptions, 
   shapeDrawer, 
   stateManager): AircraftRenderer;

Defined in: ui/map/aircraft/AircraftRenderer.ts:37

Parameters
map

Map$1

displayOptions

DisplayOptions

shapeDrawer

EntityShapeDrawer

stateManager

StateManager

Returns

AircraftRenderer

Overrides

EntityRenderer.constructor

Properties

map
protected map: Map$1;

Defined in: ui/map/EntityRenderer.ts:70

Inherited from

EntityRenderer.map

displayOptions
protected displayOptions: DisplayOptions;

Defined in: ui/map/EntityRenderer.ts:71

Inherited from

EntityRenderer.displayOptions

config
protected config: EntityRenderConfig;

Defined in: ui/map/EntityRenderer.ts:72

Inherited from

EntityRenderer.config

selectedEntity
protected selectedEntity: string | null = null;

Defined in: ui/map/EntityRenderer.ts:75

Inherited from

EntityRenderer.selectedEntity

entityData
protected entityData: AircraftData | null = null;

Defined in: ui/map/EntityRenderer.ts:76

Inherited from

EntityRenderer.entityData

featureCache
protected featureCache: Map<string, Feature<Point, GeoJsonProperties>>;

Defined in: ui/map/EntityRenderer.ts:79

Inherited from

EntityRenderer.featureCache

Methods

initialize()
initialize(forceImmediate?): void;

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

EntityRenderer.initialize

setupEntities()
protected setupEntities(): void;

Defined in: ui/map/EntityRenderer.ts:106

Set up entity sprites and layers

Returns

void

Inherited from

EntityRenderer.setupEntities

createSprites()
protected createSprites(): void;

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

EntityRenderer.createSprites

getProtectedZoneRadius()
protected getProtectedZoneRadius(entityData, index): number;

Defined in: ui/map/EntityRenderer.ts:373

Get the protected zone radius for an entity

Parameters
entityData

AircraftData

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()
updateEntityDisplay(entityData): void;

Defined in: ui/map/EntityRenderer.ts:382

Update entity display with new data using efficient incremental updates

Parameters
entityData

AircraftData

Entity data to display

Returns

void

Inherited from

EntityRenderer.updateEntityDisplay

updateProtectedZones()
protected updateProtectedZones(entityData): void;

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

AircraftData

Returns

void

Inherited from

EntityRenderer.updateProtectedZones

updateLayerVisibility()
protected updateLayerVisibility(): void;

Defined in: ui/map/EntityRenderer.ts:594

Update layer visibility based on display options

Returns

void

Inherited from

EntityRenderer.updateLayerVisibility

setSelectedEntity()
setSelectedEntity(entityId): void;

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()
updateIconSize(iconSize): void;

Defined in: ui/map/EntityRenderer.ts:629

Update icon size

Parameters
iconSize

number

New icon size multiplier

Returns

void

Inherited from

EntityRenderer.updateIconSize

updateColors()
updateColors(colors): void;

Defined in: ui/map/EntityRenderer.ts:642

Update entity colors

Parameters
colors

Partial\<EntityColors>

New color configuration

Returns

void

Inherited from

EntityRenderer.updateColors

setEntityShape()
setEntityShape(shapeDrawer): void;

Defined in: ui/map/EntityRenderer.ts:701

Change the entity shape at runtime

Parameters
shapeDrawer

EntityShapeDrawer

New shape drawing function

Returns

void

Inherited from

EntityRenderer.setEntityShape

onStyleChange()
onStyleChange(): void;

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

EntityRenderer.onStyleChange

destroy()
destroy(): void;

Defined in: ui/map/EntityRenderer.ts:745

Clean up resources

Returns

void

Inherited from

EntityRenderer.destroy

buildEntityLabel()
protected buildEntityLabel(aircraftData, index): string;

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

AircraftData

index

number

Returns

string

Overrides

EntityRenderer.buildEntityLabel

getConflictStatus()
protected getConflictStatus(aircraftData, index): boolean;

Defined in: ui/map/aircraft/AircraftRenderer.ts:104

Get conflict status for an aircraft

Parameters
aircraftData

AircraftData

index

number

Returns

boolean

Overrides

EntityRenderer.getConflictStatus

shouldShowLabels()
protected shouldShowLabels(): boolean;

Defined in: ui/map/aircraft/AircraftRenderer.ts:111

Determine if labels should be shown

Returns

boolean

Overrides

EntityRenderer.shouldShowLabels

shouldShowEntities()
protected shouldShowEntities(): boolean;

Defined in: ui/map/aircraft/AircraftRenderer.ts:118

Determine if aircraft should be shown

Returns

boolean

Overrides

EntityRenderer.shouldShowEntities

shouldShowProtectedZones()
protected shouldShowProtectedZones(): boolean;

Defined in: ui/map/aircraft/AircraftRenderer.ts:125

Determine if protected zones should be shown

Returns

boolean

Overrides

EntityRenderer.shouldShowProtectedZones

setupLayers()
protected setupLayers(): void;

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

EntityRenderer.setupLayers

updateAircraftDisplay()
updateAircraftDisplay(aircraftData): void;

Defined in: ui/map/aircraft/AircraftRenderer.ts:162

Update aircraft display with new data Provides aircraft-specific method name for backward compatibility

Parameters
aircraftData

AircraftData

Returns

void

clearTrails()
clearTrails(): void;

Defined in: ui/map/aircraft/AircraftRenderer.ts:291

Clear all aircraft trails

Returns

void

setSelectedAircraft()
setSelectedAircraft(aircraftId): void;

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()
updateDisplayOptions(options): void;

Defined in: ui/map/aircraft/AircraftRenderer.ts:312

Update display options

Parameters
options

Partial\<DisplayOptions>

Returns

void

setAircraftShape()
setAircraftShape(shapeDrawer): void;

Defined in: ui/map/aircraft/AircraftRenderer.ts:379

Change the aircraft shape at runtime

Parameters
shapeDrawer

EntityShapeDrawer

New shape drawing function

Returns

void

Type Aliases

AircraftShapeDrawer

type AircraftShapeDrawer = EntityShapeDrawer;

Defined in: ui/map/aircraft/AircraftRenderer.ts:13

Aircraft shape drawing function type (for backward compatibility)