Skip to content

ui/ConsoleMapPicker

Classes

ConsoleMapPicker

Defined in: ui/ConsoleMapPicker.ts:41

ConsoleMapPicker

Lets the console command input pull coordinates (and headings) from map clicks. The Console owns the input buffer and argument-position detection; this class owns the map-side state: click/mousemove handlers, cursor style, guide line source/layer, and an inline hint element.

The picker is idempotent: calling enable() repeatedly with the same kind is a no-op beyond updating the stored context. disable() cleans up all map resources and can be called multiple times safely.

Constructors

Constructor
new ConsoleMapPicker(
   mapDisplay, 
   consoleInstance, 
   navaidSnapper): ConsoleMapPicker;

Defined in: ui/ConsoleMapPicker.ts:83

Parameters
mapDisplay

MapDisplay

consoleInstance

Console

NavaidSnapper

Returns

ConsoleMapPicker

Methods

enable()
enable(ctx): void;

Defined in: ui/ConsoleMapPicker.ts:94

Enter (or update) pick mode for the given context. Safe to call on every input event: if the picker is already active for this kind, only the context is refreshed and no handlers are rebound.

Parameters
ctx

GeoContext

Returns

void

disable()
disable(): void;

Defined in: ui/ConsoleMapPicker.ts:208

Exit pick mode and clean up all map resources. Idempotent.

Returns

void

Interfaces

GeoContext

Defined in: ui/ConsoleMapPicker.ts:21

Context describing the geo-picking slot currently under the console cursor. Produced by Console.getGeoContext() and handed to ConsoleMapPicker.enable().

Properties

kind
kind: "lat" | "lon" | "hdg";

Defined in: ui/ConsoleMapPicker.ts:22

currentArgIndex
currentArgIndex: number;

Defined in: ui/ConsoleMapPicker.ts:23

params
params: string[];

Defined in: ui/ConsoleMapPicker.ts:24

parts
parts: string[];

Defined in: ui/ConsoleMapPicker.ts:25

command
command: string;

Defined in: ui/ConsoleMapPicker.ts:26