API reference / @zaes/tactical-graphics/openlayers / MissionTaskGraphicBase
Class: MissionTaskGraphicBase
Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:144
Extended by
Implements
MissionTaskGraphic
Constructors
Constructor
new MissionTaskGraphicBase(
name,
size,
drawingResolution?
): MissionTaskGraphicBase;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:173
Parameters
name
size
number
drawingResolution?
number
Returns
MissionTaskGraphicBase
Properties
base
base: Feature<LineString | Point>;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:157
The center the graphic is built around, and — since it is now published from getFeatures() — the only part of a mission task that has to survive a save. Everything else regenerates from it plus size / rotation.
base is deliberately left false. That flag means "has vertices the Modify interaction may drag" (getRenderedFeaturesByProp('base')), which a point-anchored graphic does not: it is reshaped by rotate / resize / translate. Same trick as mobileDefense in controllerRegistry.ts. The role tag, not this flag, is what identifies the feature when serializing.
Implementation of
MissionTaskGraphic.basecenter
center: Coordinate;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:145
The point the graphic is built around. Declared alongside size and rotation because the three together are the whole of a point-anchored graphic's editable state — which is exactly what save/restore has to carry.
Implementation of
MissionTaskGraphic.centercenterHandle
centerHandle: Feature<MultiPoint>;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:164
The center dot — visual anchor only.
See
publishHandles
graphic
graphic: Feature;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:165
handles
handles: Feature<MultiPoint>;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:162
label
label: Feature;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:170
measure
measure: Feature;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:169
The radius read-out. Empty unless a gesture is in progress —
See
showMeasure.
mirrored
mirrored: boolean = false;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:476
Which side an asymmetric point-anchored graphic hangs its hook on — Pursuit's semicircle and P-line. Reflected in the graphic's own local frame, so it survives rotation. Stamped and replayed like any other geometry input.
name
name: TacticalGraphicName;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:171
Implementation of
MissionTaskGraphic.namerotation
rotation: number = 0;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:158
Implementation of
MissionTaskGraphic.rotationsize
size: number;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:159
Implementation of
MissionTaskGraphic.sizesymbolId
symbolId: string = '';Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:160
Implementation of
MissionTaskGraphic.symbolIdMethods
centerCoordinate()
centerCoordinate(): Coordinate;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:763
The center, which is holder state rather than something to read back off the base.
It used to come from this.base.getGeometry().getCoordinates(), which is a coordinate for a point base and an array of them for an anchored one — so every style that consumed it silently got a nested array the moment a graphic converted.
Returns
Coordinate
Implementation of
MissionTaskGraphic.centerCoordinategetFeatures()
getFeatures(): Feature<Geometry, {
[x: string]: any;
}>[];Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:610
Returns
Feature<Geometry, { [x: string]: any; }>[]
Implementation of
MissionTaskGraphic.getFeaturessetBaseFeature()
setBaseFeature(base): void;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:724
Adopts a new center point.
Used to be this.base = base and nothing else, which left center pointing at the old coordinate: the next rotate or resize — neither passes a center — would read the stale this.center back out and snap the graphic to where it used to be. Mission tasks are kept out of the Modify interaction so nothing reached this in practice, but it is on the public TacticalGraphicHandler interface and the manager calls it by symbolId.
Parameters
base
Feature<LineString | Point>
Returns
void
Implementation of
MissionTaskGraphic.setBaseFeaturesetMirrored()
setMirrored(mirrored): void;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:479
Parameters
mirrored
boolean
Returns
void
See
TacticalGraphicHandler.setMirrored
Implementation of
MissionTaskGraphic.setMirroredsetSymbolId()
setSymbolId(symbolId): void;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:706
Parameters
symbolId
string
Returns
void
Implementation of
MissionTaskGraphic.setSymbolIdshowMeasure()
showMeasure(active, anchor?): void;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:464
Arms or disarms the radius read-out.
Armed by the controller for the duration of a draw or resize gesture and disarmed when it ends, so the hashed line is a live measurement rather than decoration. Off by default, which is what keeps it out of a restored map and out of the sample gallery — both drive updateGeom without any gesture.
Parameters
active
boolean
anchor?
Coordinate
Returns
void
Implementation of
MissionTaskGraphic.showMeasureupdateGeom()
updateGeom(__namedParameters): void;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:668
Parameters
__namedParameters
center?
Coordinate
rotation?
number
size?
number
Returns
void
Implementation of
MissionTaskGraphic.updateGeomupdateGeometry()
updateGeometry(): void;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:331
Returns
void