ui/map/shapes/shapeCommand¶
Interfaces¶
ShapePoint¶
Defined in: ui/map/shapes/shapeCommand.ts:9
A drawn point in {lat, lng} form (BaseDrawingManager's DrawingPoint).
Properties¶
lat¶
Defined in: ui/map/shapes/shapeCommand.ts:10
lng¶
Defined in: ui/map/shapes/shapeCommand.ts:11
ShapeCommandSpec¶
Defined in: ui/map/shapes/shapeCommand.ts:49
Properties¶
name¶
Defined in: ui/map/shapes/shapeCommand.ts:50
type¶
Defined in: ui/map/shapes/shapeCommand.ts:51
points¶
Defined in: ui/map/shapes/shapeCommand.ts:56
The placed points. Areas/lines use all of them; a box is its two opposite corners; a circle is [centre, point-on-rim].
topAltitude¶
Defined in: ui/map/shapes/shapeCommand.ts:58
Top/bottom altitude in feet; both null = no vertical extent.
bottomAltitude¶
Defined in: ui/map/shapes/shapeCommand.ts:59
Type Aliases¶
ShapeType¶
Defined in: ui/map/shapes/shapeCommand.ts:15
The shape kinds offered by the draw modal.
AltitudeParseResult¶
type AltitudeParseResult =
| {
ok: true;
top: number | null;
bottom: number | null;
}
| {
ok: false;
error: string;
};
Defined in: ui/map/shapes/shapeCommand.ts:17
Functions¶
parseAltitudeInputs()¶
Defined in: ui/map/shapes/shapeCommand.ts:27
Parse the draw modal's optional top/bottom altitude inputs. Both empty means no vertical extent; anything else needs two finite numbers with top above bottom, so a non-numeric value can't leak into the generated command as NaN and a half-filled pair isn't silently dropped.
Parameters¶
topRaw¶
string
bottomRaw¶
string
Returns¶
buildShapeCommand()¶
Defined in: ui/map/shapes/shapeCommand.ts:70
Build the BlueSky command for a drawn shape: - line -> POLYLINE name,lat,lon,... - area with alts -> POLYALT name,top,bottom,lat,lon,... - area without alts -> POLY name,lat,lon,... - box -> BOX name,lat0,lon0,lat1,lon1[,top,bottom] - circle -> CIRCLE name,clat,clon,radius_nm[,top,bottom]
Parameters¶
spec¶
Returns¶
string