API reference / @zaes/tactical-graphics/openlayers / CircularAreaGraphicBase
Class: CircularAreaGraphicBase
Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:913
Extends
Constructors
Constructor
new CircularAreaGraphicBase(
name,
size,
drawingResolution?
): CircularAreaGraphicBase;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:916
Parameters
name
size
number
drawingResolution?
number
Returns
CircularAreaGraphicBase
Overrides
MissionTaskGraphicBase.constructor
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.
Inherited from
center
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.
Inherited from
centerHandle
centerHandle: Feature<MultiPoint>;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:164
The center dot — visual anchor only.
See
publishHandles
Inherited from
MissionTaskGraphicBase.centerHandle
graphic
graphic: Feature;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:165
Inherited from
MissionTaskGraphicBase.graphic
graphicLabels
graphicLabels: GraphicLabels;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:914
handles
handles: Feature<MultiPoint>;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:162
Inherited from
MissionTaskGraphicBase.handles
label
label: Feature;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:170
Inherited from
measure
measure: Feature;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:169
The radius read-out. Empty unless a gesture is in progress —
See
showMeasure.
Inherited from
MissionTaskGraphicBase.measure
mirrored
mirrored: boolean = false;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:477
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.
Inherited from
MissionTaskGraphicBase.mirrored
name
name: TacticalGraphicName;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:171
Inherited from
rotation
rotation: number = 0;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:158
Inherited from
MissionTaskGraphicBase.rotation
size
size: number;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:159
Inherited from
symbolId
symbolId: string = '';Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:160
Inherited from
MissionTaskGraphicBase.symbolId
Methods
centerCoordinate()
centerCoordinate(): Coordinate;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:765
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
Inherited from
MissionTaskGraphicBase.centerCoordinate
getFeatures()
getFeatures(): Feature<Geometry, {
[x: string]: any;
}>[];Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:611
Returns
Feature<Geometry, { [x: string]: any; }>[]
Inherited from
MissionTaskGraphicBase.getFeatures
setBaseFeature()
setBaseFeature(base): void;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:725
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
Inherited from
MissionTaskGraphicBase.setBaseFeature
setLabel()
setLabel(labels): void;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:948
Parameters
labels
Returns
void
setMirrored()
setMirrored(mirrored): void;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:480
Parameters
mirrored
boolean
Returns
void
See
TacticalGraphicHandler.setMirrored
Inherited from
MissionTaskGraphicBase.setMirrored
setSymbolId()
setSymbolId(symbolId): void;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:707
Parameters
symbolId
string
Returns
void
Inherited from
MissionTaskGraphicBase.setSymbolId
showMeasure()
showMeasure(active, anchor?): void;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:465
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
Inherited from
MissionTaskGraphicBase.showMeasure
updateGeom()
updateGeom(__namedParameters): void;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:669
Parameters
__namedParameters
center?
Coordinate
rotation?
number
size?
number
Returns
void
Inherited from
MissionTaskGraphicBase.updateGeom
updateGeometry()
updateGeometry(): void;Defined in: components/openlayers/graphics/MissionTaskGraphicBase.ts:331
Returns
void