Skip to content

ui/map/shapes/shapeGeometry

Interfaces

GeoPoint

Defined in: ui/map/shapes/shapeGeometry.ts:9

A geographic point in {lat, lng} form (BaseDrawingManager's DrawingPoint).

Properties

lat
lat: number;

Defined in: ui/map/shapes/shapeGeometry.ts:10

lng
lng: number;

Defined in: ui/map/shapes/shapeGeometry.ts:11

Variables

CIRCLE_PREVIEW_SEGMENTS

const CIRCLE_PREVIEW_SEGMENTS: 72 = 72;

Defined in: ui/map/shapes/shapeGeometry.ts:22

Number of segments used to preview a circle as a polygon ring. Matches the backend's CIRCLE tessellation (proxy/handlers/shapes.py) so the preview looks like what the server will render back.

Functions

distanceNm()

function distanceNm(a, b): number;

Defined in: ui/map/shapes/shapeGeometry.ts:25

Great-circle (haversine) distance between two points in nautical miles.

Parameters

a

GeoPoint

b

GeoPoint

Returns

number


boxCornerPoints()

function boxCornerPoints(a, b): GeoPoint[];

Defined in: ui/map/shapes/shapeGeometry.ts:40

Expand two opposite corners of an axis-aligned box (BlueSky BOX semantics) into its four corners, in ring order.

Parameters

a

GeoPoint

b

GeoPoint

Returns

GeoPoint[]


circleRingPoints()

function circleRingPoints(
   center, 
   radiusNm, 
   segments?): GeoPoint[];

Defined in: ui/map/shapes/shapeGeometry.ts:54

Tessellate a circle (centre + radius in nautical miles) into a polygon ring using the same equirectangular approximation as the backend's CIRCLE-to-POLY conversion, so the preview matches the rendered result.

Parameters

center

GeoPoint

radiusNm

number

segments?

number = CIRCLE_PREVIEW_SEGMENTS

Returns

GeoPoint[]